Visual Studio deleting .exe files in \Debug\ folder.

  • Thread starter Thread starter Mholnic-
  • Start date Start date
  • Tags Tags
    files Visual
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 10K views
Mholnic-
Messages
43
Reaction score
0
(Programming and VS newb here.)

I'm hoping someone has had (and fixed!) this problem. I'm working on a project for my CS-150 class but I'm having some tech troubles. I'm running Visual Studio 2010 Ultimate (downloaded via MSDNAA) and it (or something else) seems to be deleting my project.exe files.

When I hit Debug, it runs through to the end and then gives me the following:
"Unable to start program C:\Users\Admin\Documents\Visual Studio 2010\Projects\projectname\Debug\projectname.exe" "The system cannot find the file specified."

I go to the location and sure enough, the exe file is gone. But it was there before. I've been getting this error since I downloaded it, and have gotten into the habit of confirming the exe file's existence after the first debug. It'll work fine for a bit and then *poof* the .exe disappears. I have no idea where it goes, or how to get it back. I'm essentially being forced to delete my project and make several new ones until the exe file returns.. and then it'll disappear again.

Here is an example of a working file, with the .exe still in it:
C:\Users\Admin\Documents\Visual Studio 2010\Projects\OneLastTry\Debug\OneLastTry.exe

And a file that WAS working but no longer has the .exe:
C:\Users\Admin\Documents\Visual Studio 2010\Projects\Lab2Prj\Debug

I can't see a difference in the three, short of the fact that only one has the executable that it should. I've double and triple-checked to be sure that files are being sent to the right place, but to no avail. Has anyone had this problem, or know how to fix it? I obviously don't know enough about the program to know what it's doing to my files. xD
 
Physics news on Phys.org
After creating the .exe file, try setting the attribute to read-only and perhaps system. Hopefully that will cause the system to prompt you when there's an attempt to delete the .exe.