Visual Studio的"无法复制" ....生成过程 [英] Visual Studio "Could not copy" .... during build

查看:425
本文介绍了Visual Studio的"无法复制" ....生成过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我把我的VS2012 C#项目的构建过程中收到此错误

I keep getting this error during the build of my VS2012 C# project

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.exe

工作(有时),但它让我心烦。任何方式在所有阻止这种情况发生?

works (sometimes ) but this is getting on my nerves. Any way to stop this happening at all?

我的调试程序设置为


推荐答案

我能够通过提供以下pre构建行动来解决这个问题(VS 2010);

I was able to fix this issue (VS 2010) through supplying following pre build action;

if exist "$(TargetPath).locked" del "$(TargetPath).locked"

if exist "$(TargetPath)" if not exist "$(TargetPath).locked" move "$(TargetPath)" "$(TargetPath).locked"

这篇关于Visual Studio的"无法复制" ....生成过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆