Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

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

  1. Sep 3, 2011 #1
    (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
  2. jcsd
  3. Sep 3, 2011 #2


    User Avatar
    Homework Helper

    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.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook