#How to fix this

1 messages · Page 1 of 1 (latest)

empty crystal
#

The file is locked by:(A name)
Anyways just can't run the proggram

#

C:\Program Files\dotnet\sdk\7.0.305\Microsoft.Common.CurrentVersion.targets(4685,5): error MSB3021: Unable to copy file "obj\De
bug\net7.0\if.dll" to "bin\Debug\net7.0\if.dll". The process cannot access the file 'C:\Users\user\OneDrive\Desktop\if\bin\Debu
g\net7.0\if.dll' because it is being used by another process. [C:\Users\user\OneDrive\Desktop\if\if.csproj]

haughty crest
#

The error message is pretty clear.
The solution should be simple as well: Don't store your projects on OneDrive. If you need versioning, use Git.

empty crystal
#

How to dont let the system store my project

empty crystal
#

so should i save my project in once folder?

haughty crest
haughty crest
empty crystal
haughty crest
#

Is that your Desktop?

empty crystal
#

ye

#

download 32 or 64?

haughty crest
# empty crystal ye

I would advise against putting projects on your Desktop; that'll just create a mess.
Instead, make a folder somewhere on your hard drive (I think the default location would be C:\source\). Personally, I have a dedicated hard drive for programming projects.

haughty crest
empty crystal
#

wym make a folder somewhere on my hard drive because when i open folder i need to choose a folder that i program

#

oh i got it

#

alr

#

so i should download git for fix problem that all right?

#

which should i choose

#

or up to me

haughty crest
haughty crest
empty crystal
#

ok

#

So i just dont store my project on onedrive for fix the problem?

haughty crest
#

that should solve the issue, yes

#

(as long as you don't choose another restricted location to put your project in)

empty crystal
#

why still can't run

haughty crest
#

dunno
try running dotnet clean

empty crystal
#

He say that the file is locked by .Net host

#

YES

#

It run

#

finally

#

omg thank you so much

#

but still have the problem ;-;

haughty crest
#

The path in the screenshot you sent still says "OneDrive".

#

Aside from that, try deleting the bin and obj folders from your project directory.

#

And maybe consider using Visual Studio, rather than Visual Studio Code.

novel mason
#

Your desktop, documents, pictures, music, and videos folders are all onedrive synched. You have to explicitly turn it off it's stupid