patterncsharpCritical
Visual Studio "Could not copy" .... during build
Viewed 0 times
duringcouldstudiovisualnotbuildcopy
Problem
I keep getting this error during the build of my VS2012 C# project
Now I've figured out that killing the process
works (sometimes ) but this is getting on my nerves. Any way to stop this happening at all?
My debugger settings are
Error 41 Could not copy "obj\Debug\WeinGartner.WeinCad.exe" to
"bin\Debug\WeinGartner.WeinCad.exe".
Exceeded retry count of 10. Failed.
Error 42 Unable to copy file "obj\Debug\WeinGartner.WeinCad.exe" to
"bin\Debug\WeinGartner.WeinCad.exe". The process cannot access the file
'bin\Debug\WeinGartner.WeinCad.exe' because it is being used by another
process.Now I've figured out that killing the process
Weingartner.WeinCad.vhost.exeworks (sometimes ) but this is getting on my nerves. Any way to stop this happening at all?
My debugger settings are
Solution
I have encountered similar error messages in Visual Studio 2013.
Mostly, I have found that this situation has occurred when a debug process was halted because of an exception.
When clean+build has not resolved this problem for me, I have had success by doing the following:
This "bug" has existed since Visual Studio 2003.
Finally, I have also found that I can often overcome this problem by simply renaming the executable file and then deleting it.
Mostly, I have found that this situation has occurred when a debug process was halted because of an exception.
When clean+build has not resolved this problem for me, I have had success by doing the following:
- Closing Visual Studio
- Deleting the
binandobjfolders, and
- Reopening Visual Studio.
This "bug" has existed since Visual Studio 2003.
Finally, I have also found that I can often overcome this problem by simply renaming the executable file and then deleting it.
Context
Stack Overflow Q#18102859, score: 556
Revisions (0)
No revisions yet.