VS2010 throwing “Could not copy the file ”obj\x86\

2020-04-03 23:08发布

I'm writing a Windows Phone 8 game which requires a number of support desktop applications: level editors etc. Since I only have express versions of VS, I'm using 2010 for Windows Phone to create these (2012 does not offer the ability to create Windows applications, and I need XNA).

Recently, I've been getting an odd error when I try to build: "Could not copy the file "obj\x86\Debug\LevelEditor.exe" because it was not found."

I tried a number of solutions, even going so far as to completely rebuild the solution, re-creating all the class files then copy-pasting the code in from the old files via text editor - nothing works.

This error appears to be completely spurious, almost as if there is some kind of size limitation on my project: playing around with string constants in various classes seems to point to this as I can extend the number of characters in one until the error occurs, then reduce another in a completely different class and the project will build again.

Has anyone else seen this sort of behaviour? And is there a solution, as it's driving me nuts!

2条回答
Fickle 薄情
2楼-- · 2020-04-03 23:32

Just go to Task Manager in Processes and find the name of your project, then right click and end the process. Then open your project in Visual Studio, click run and it will work.

查看更多
混吃等死
3楼-- · 2020-04-03 23:47

As said, Avast was the problem. Thanks!

查看更多
登录 后发表回答