AutoRecover

Tips Search

AutoRecover

  • Comments 30

Menu:  Tools -> Options -> Environment -> AutoRecover
Versions:  2008,2010,2012,2013
Published:  6/30/2010
Code:  vstipEnv0019

 

=====

WARNING: Read the comments associated with this post as there are multiple complaints that this features doesn't work as expected. Read this thread from the engineering folks about usage with versions VS2010 and older.

http://connect.microsoft.com/VisualStudio/feedback/details/731561/autorecover-on-new-files-does-not-work

=====

 

Perhaps your best friend is the AutoRecover feature.  It can be a real life saver if the dev environment crashes or there is a power outage or a meteor hits your cube (okay, maybe not that last one).  It's very simple to use, just go to Tools -> Options -> Environment -> AutoRecover:

image

 

If you want to turn this feature off you can deselect the "Save AutoRecover information every" checkbox.  Of course, if you do this we will all laugh at you when you lose important work because you didn't have it and I will personally blog about it so everyone knows--you might want to leave it on--just saying.  Here is what the other options do:

 

X minutes - determines how often files have AutoRecover information saved.  The default is 5 minutes but you can adjust up or down depending on usage.  There is an inverse relationship between this value and the frequency of your updates to code.  If you make more frequent updates to code then have a lower number here.  Fewer updates to code mean you can increase this number if you desire.  If you are going to make a mistake here make it on the side of a number that is too low rather than too high.  It's better to take any performance hit from file I/O than to lose a ton of work.

 

X days - used to decide how long AutoRecover files are kept in the Backup Files directory.  The default is 7 days which is usually adequate for most situations.  If you work with a lot of projects over a short period of time then you may want to decrease this number to keep the Backup Files directory more clear.  If you are going to guess on this value then it's better to guess high and lower the number as needed. 

 

 

 

Let's be clear on what a is exactly saved and where it is saved.  First, recovered files are stored at \...\My Documents\Visual Studio <version>\Backup Files\<projectname>.  Not every file is saved here.  Let me show you an example:

 

Here is the backup folder for one of my solutions when I create it in Visual Studio:

image

 

Obviously the folder is empty.  Now let me make a change to a file and save the change.  Then I'll wait 5 minutes to see the result:

image

 

Still nothing because there is no need to recover a saved file.  But let me make a change to a file without saving it and wait another 5 minutes:

image

 

NOW we have AutoRecover information because if there is crash we will have to make a decision to recover the unsaved changes or keep the last saved version.  This is essentially the function of AutoRecover.

 

 

 

When you do finally have to recover a file, this is the dialog you will get:

image

 

 

 

 

Recovered files - lists the file(s) that can be recovered with a a checkbox to select/deselect the file as well as basic information.

 

<File Name> Summary - shows detailed information about the currently selected file including date/time info, location of the backup file, and destination location where the file will be recovered to.

 

Recover Selected Files - performs a recovery action on the file(s) selected copying the recovered source file to the previously indicated destination.

 

Do Not Recover - closes the dialog box without recovering any of the files listed.

  • I agree this 'feature' is broken big time. My setting are the default 5min/7days. I had a crash and lost a single file in a solution - COMPLETELY, as in the whole file was overwritten with 0x00's.

    VS restarted like nothing happened. I check the backup directory - no files. Use Recuva to scan the backup directory - NO DELETED files either whatsoever,

    like nothing has ever been written there.

  • Spent five hours updating a web app that's used annually. My "S" key is practically worn off because it hit CTRL+S so often. I also click the "save all documents" icon frequently. Sometime during the weekend my computer crashed. When I next launched Visual Studio, and it asked me if I wanted to restore. I knew I didn't because I hadn't worked on that project for a couple of days. I just never closed it. So I said "no." Somehow, my aspx page was rolled back to the very first change I made to it at the beginning of the previous Friday. Now I'm screwed. And pissed.

  • Check if you got some "enc_temp_folder" folder in your solution, i could restore one of my files thanks to tmp files there.

    Hoping this will be debugged soon, it's quite an important feature...

  • The location is my problem. In Company is everything fine, but from home with a vpn connection I have to wait 20 seconds every time because my home dir is mapped to a net share

  • I have lost 3 days worth of work twice!!!!!!!!!!!!! OMG, you can only image how upset I am.

  • First, recovered files are stored at \...\My Documents\Visual Studio <version>\Backup Files\<projectname>

    First, how wrong is that???

    They are saved to "My Documents" which, is in most cases, highly unlikely to be "\..", and in many corporate cases likely to be on a shared network drive.  This can cause VS to freeze up every 5 minutes (depending on the setting) as it tries to access a slow network resource to auto save and to freeze on save as it cleans up autosaved files.

  • Just lost 14+ hours of work.  Nice ... just love throwing my life away.  Thanks Microsoft.

  • The feature is not working. The directory is empty and I lost a day of work!!!!!!!!!!!!!!!!!

  • not working. i lost 72hrs. thousand line code. :'( lost in 0.001 sec.

  • This feature is not working at all... I have lost 5 hours of coding.. what  a crap..

  • Great! I was just debugging a simple multithreaded app and got BSOD. This happened to me the second time. On first crash I lost 4 hours of work. Today 3 days of work went pufff in smoke. Visual studio 2010 Express. Sad

  • Okay, I'll do my annual checking with the AutoRecover cover team to see if the problems are outliers or the norm. I don't have line-of-sight to how often this happens but, based on the feedback here, I would have to conclude it is a high enough percentage to warrant looking into it. I'll post back here if I hear anything worth mentioning from the team.

    Z

  • Same story....almost lost hours of work!

    BUT my home folder is actually located on a network drive which have the feature "Restore previos version" (a Windows server storage feature).....an I manage to restore my auto-recovery files from there :-)

  • I lost my a day work... Come on Microsoft. Please resolve this issue ASAP...

  • thank you,I really need this now...

Page 2 of 2 (30 items) 12
Leave a Comment
  • Please add 8 and 8 and type the answer here:
  • Post