8

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!

Ben Pritchard
  • 231
  • 1
  • 4
  • 11
  • 1
    Is it possible that your project file contains a hard reference to the Debug output and you've switched to a Release build? – JaredPar Nov 26 '13 at 19:11
  • 9
    Something deleted the file right after the compiler created it. That's not very uncommon, it is a virus that infects many machines. Goes by many names, Avast is especially nasty. – Hans Passant Nov 26 '13 at 21:07
  • Thanks Hans - didn't even think that Avast might be causing problems with my own builds... and having it switched to silent mode didn't help! Excluded the build path from the Avast scan, and the project's building again. Thanks! – Ben Pritchard Dec 01 '13 at 21:51
  • 3
    I had the same issue and after copy pasting the enitre thing into a new directory and then loading up the copy in VS it worked. Maybe this will work for you. – ClassicThunder Mar 27 '14 at 16:00

2 Answers2

10

As said, Avast was the problem. Thanks!

Ben Pritchard
  • 231
  • 1
  • 4
  • 11
0

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.

user3708214
  • 1
  • 1
  • 2