Last week I happily started a project in Visual Studio 2008 and made some good progress in getting my code ready. What I hadn't realised was Visual Studio started this project in Temporary Project mode. It's a useful feature if like me you need to quickly try out a few ideas on a quick application. The only problem with Temporary Projects is what seems to happen to them when your machine crashes (a rare occurrence but it happens).
As you guessed my machine crashed after I had tried to start it up after putting it in hibernation mode. When I went back to Visual Studio I couldn't find any trace of my projects in its history and searched my hard disk for the project which was mysteriously gone. Doing some BING-ing (yes I have started using Microsoft's new search engine) I found the location for Temporary Projects, which is:
C:\Users\<your username>\AppData\Local\Temporary Projects
Opening this folder I was horrified to discover it was empty, where had my project gone? My only theory on the matter was that temporary projects ask you if you want to save them when you close Visual Studio. Because Visual Studio had effectively been terminated when my machine crashed I am guessing when I started up Visual Studio again when my machine rebooted it must have deleted what was in the Temporary Projects folder. I'd love to know if this is the case, anyway to cut a long story short there is a feature in Vista I have never used until today called "Restore previous versions". To restore a previous version of a folder right click on the folder and select this option. You can then select which version of the folder you wish to recover –great! What a life saver that was!