Visual Studio“无法复制".... 在构建过程中 [英] Visual Studio "Could not copy" .... during build
问题描述
我在构建 VS2012 C# 项目期间不断收到此错误
I keep getting this error during the build of my VS2012 C# project
Error 41 Could not copy "objDebugWeinGartner.WeinCad.exe" to
"binDebugWeinGartner.WeinCad.exe".
Exceeded retry count of 10. Failed.
Error 42 Unable to copy file "objDebugWeinGartner.WeinCad.exe" to
"binDebugWeinGartner.WeinCad.exe". The process cannot access the file
'binDebugWeinGartner.WeinCad.exe' because it is being used by another
process.
现在我想出了杀死进程
Weingartner.WeinCad.vhost.exe
有效(有时),但这让我很紧张.有什么办法可以阻止这种情况发生?
works (sometimes ) but this is getting on my nerves. Any way to stop this happening at all?
我的调试器设置是
推荐答案
我在 Visual Studio 2013 中遇到过类似的错误消息.
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.
当 clean+build 没有为我解决这个问题时,我通过执行以下操作取得了成功:
When clean+build has not resolved this problem for me, I have had success by doing the following:
- 关闭 Visual Studio
- 删除
bin
和obj
文件夹,以及 - 重新打开 Visual Studio.
这个错误"从 Visual Studio 2003 开始就存在了.
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.
这篇关于Visual Studio“无法复制".... 在构建过程中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!