Unable to copy file "* \ bin \ debug \ *. Dll" to "bin \ *. Dll" in Visual Studio

I ran into this problem

Unable to copy file "*\bin\debug\*.dll"to"bin\*.dll"

And when that happens, compilation will fail due to the above error.

Edit: I know that the file is locked by the devenv.exe process, which leads to the above error, because if I restart VS, the problem will disappear, but will it still be fixed without restarting VS?

+3
source share
4 answers

FWIW, this error has been around for YEARS, and MS still hasn't fixed it. Just google "MSB3021" to view all posts about it.

+2
source

, , VS, , , , .

MSDN : obj\debug bin\debug", :

1

, ( , ), Build "". :

"$ (TargetPath).locked" del "$ (TargetPath)." "$ (TargetPath)." "$ (TargetPath)" "$ (TargetPath)."

.

:

, , . :

"$ (TargetPath).locked" del "$ (TargetPath)." "$ (TargetPath)." "$ (TargetPath)" move "$ (TargetPath)" "$ (TargetPath).locked"

2

, [ ] bin obj.

-

+6

I already saw this problem before, if I remember correctly, I just closed Visual Studio and started it again. If you know the process of locking your file, you need to find a way: a) force the process to release the lock, b) kill the process

+1
source

I saw this problem, I went to the folder for debugging my project in the VBprojects folder and deleted the files, then rebuilt the application and worked

0
source

Source: https://habr.com/ru/post/1727940/


All Articles