| Subcribe via RSS

Lost Visual Studio Project Files

April 30th, 2009 Posted in visual studio

Save your work, save your work, for God’s sakes man save your work. Ok I feel better after getting that off my chest.

So evidently the new Visual Studio Express 2008 is saving files in a temp directory to enable you to create quick tester projects without cluttering up your Projects directory. I don’t know about you, but personally I’d rather have the clutter than lose a project I’d been working on and off for two days. In the world I had been living in, you can compile the project — it saves — you are good to go. Well I got in my final compile then I went to find the executable. No trace of it under the local Visual Studio 2008 Projects folder within my profile. I close out of VS thinking it would be there on last opened projects when I went back in. No go. Come to find out this temp project was being stored in C:\Users{Username}\AppData\Local\Temporary Projects while I was developing it, but there is no trace of it now.

After doing some research online, it has indeed disappeared like a fart in the wind. So for your sanity as well as mine, go into Visual Studio right now and go to Tools > Options > Projects and Solutions and check that box that says Save new projects when created. No one should have to go through this headache just because Microsoft decided it would be cute not to include this by default anymore.

My only partial saving grace is last night I had done a compile and pulled out the exe file to run in a directory on the root. You’d think it would have occured to me at the time that these project files really shouldn’t be in a folder marked ‘Temporary Projects.’ Anyway with the exe in hand, I decided to look for a c# decompiler program to at least recover part of my work. I found this great free app by Redgate called .NET Reflector. I just pointed it to the exe and it kicked back the code in the disassembler. Pretty cool stuff. Now if I just had the final exe to reverse engineer. Oh did I mention you should save your work?