【发布时间】:2013-08-08 19:09:49
【问题描述】:
我在构建 VS2012 C# 项目期间不断收到此错误
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.
现在我发现杀死进程
Weingartner.WeinCad.vhost.exe
有效(有时),但这让我很紧张。有什么办法可以完全阻止这种情况的发生?
我的调试器设置是
【问题讨论】:
-
对我来说,这是由在 Release 目录中手动启动的 .exe 引起的。问题是 VS 无法复制仍在运行的可执行文件。我会尝试通过正确清理资源来修复它,这样程序就不会在窗口关闭按钮后挂起。
-
在this question 中有一个很好的总结这个问题的典型步骤来解决
-
这发生在我身上,因为 Windows Defender 决定它不再喜欢我正在处理的 VS2019 项目中的 .exe。几个星期以来一直在努力解决这个问题,但今天,猜猜一个新的更新不喜欢它。不得不排除我的源文件夹。停止发生。
标签: c# visual-studio-2012 build process