Just got a random bsod on my machine and Form1.cs is suddenly empty, any way to restore the code? thanks..
+5
A:
You could check C:\Documents and Settings\UserName\My Documents\Visual Studio 2010\Backup Files\
(or the equivalent on your system).
Files will be placed there if auto-recover is enabled, which I believe it is by default. If you want to check that feature is enabled, follow the steps here: http://blogs.msdn.com/b/zainnab/archive/2010/06/30/autorecover-vstipenv0019.aspx
Another top tip is to set 'Save all changes' before building. That setting is in Options, under Projects and Solutions / Build and Run.
PaulG
2010-10-10 15:10:28
The folder is empty, the bsod occured when I started the compiling process.
user471570
2010-10-10 15:16:45
Sorry to hear that. I updated answer with another setting that may help prevent this next time.
PaulG
2010-10-10 15:23:54
@PaulG: I thought 'Save all changes' was the deafult setting ???
Mitch Wheat
2010-10-10 15:27:07
@PaulG: Thanks, back to rewriting it. :)
user471570
2010-10-10 15:29:41
A:
I'm sorry that you've lost your code, but the real answer is that your version control system should be providing this functionality. Failing that, you've got backups, right?
Andrew Aylett
2010-10-10 15:27:57