转自https://stackoverflow.com/questions/18102859/visual-studio-could-not-copy-during-build
错误提示:
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.
解决办法:
I encountered the error message(s) in VS 2013.Mostly it occured when the debug proces was stopped somewhere in an exception.When clean+build has no effect, closing VS, deleting 'bin' and 'obj' folders en openening VS again has till now always resolved the issue.The bug exists since VS2003. Also: renaming the file is often possible and then you can delete it.