Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Visual Studio 2010 create backup files?

Just got a random bsod on my machine and Form1.cs is suddenly empty, any way to restore the code? thanks..

like image 669
user471570 Avatar asked Oct 10 '10 14:10

user471570


People also ask

Does Visual Studio make backups?

For previously saved files, Visual Studio saves a copy of the file in %LocalAppData%\Microsoft\VisualStudio\BackupFiles\[projectname]. If the file is new and you haven't saved it yet, Visual Studio autosaves it by using a randomly generated file name.

How do I backup a Visual Studio project?

Creating a backup of current solution or project is easy, and it's done directly inside VisualStudio: right-click on the solution and select "Backup solution..." right-click on a project select "Backup project..."


1 Answers

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.

like image 157
PaulG Avatar answered Sep 18 '22 17:09

PaulG