I encountered this problem
Unable to Copy File
"*\bin\debug\*.dll"to"bin\*.dll"
And when this happens, the compilation will fail because of the above error.
Edit: I know that the file is locked by the devenv.exe process that results in the above error because if I restart the VS, then the problem would go away, but is there anyway to fix this without actually restarting the VS?
FWIW, this bug has been around for YEARS and MS still haven’t fixed it. Just google “MSB3021” to see all the posts about it.