Question

In VS 2010, after I would close my solution, and then re-open it the next day, all the documents that I had open, would still be open. Just what I wanted.

After installing SP1, every time I open my solution, all my documents are closed, no matter what state I left them in.

Is this expected behavior, a bug, or is there a setting I don't know about? How can I get my documents back?

EDIT 29-Mar

Re-installing VS2010 and SP1 did not resolve this issue.

Was it helpful?

Solution

Backup your settings then do a devenv.exe /resetsettings.

OTHER TIPS

Building on top of SteveBob's answer, just do a Window -> Reset Window Layout

This should fix the tab problem. There is of course the side-effect that you'll have to redo/re-add all the windows ( output, solution explorer, properties, find, watches, immediate, etc)

It appears that there is not an adjustable setting that controls whether or not the open documents are remembered. By default, Visual Studio stores this data and then re-opens the documents that were open the last time the project/solution was closed. As pointed out by some links referenced by Stuart Dunkeld, it takes a Macro in Visual Studio to override this default behavior.

My problem appears to be that my 'Settings' had become bloated/corrupt. Based on the suggestion of Luke, I exported my settings, then did a reset. This restored the default 'Remember Open Documents' behavior. Then after much fooling around, I was able to import (almost) all of my old settings and still not mess up the proper document behavior.

When importing my settings, I selected everything except the 'Window Layouts' settings.

enter image description here

This restored my existing settings, while keeping the default Visual Studio behavior of remembering which documents were open.

I then re-exported my (fixed) settings so that I had a backup. That's when I noticed that my old, possibly corrupt exported settings file was 8.6MB, while my new, correct exported settings file was only 0.2MB.

After examining some of the differences between these two settings files, some of the information leads me to believe that the installation of VS2010 SP1 had a conflict with the 'Document Well 2010 Plus' feature in the Productivity Power Tools extension, but I cannot positively verify this.

Does it work OK with a new solution? If so, you could try trashing the .suo file attached to your solution.

I keep a lot of files open. Every so often, my VS2012 stops restoring the open files. Opening them again does not help the restore process.

I tried:

  • All the above suggestions, and all the suggestions I could find elsewhere
  • In particular: deleting .suo, .filters, .sdf, .opensdf, etc
  • Plus /resetlayout
  • Plus /resetsettings(ouch)

And none work for me. Or, at least not reliably.

But I just tried:

  • Install Productivity Power Tools
  • Enable Options / Productivity Power Tools / All Extensions / Custom Document Well
  • Restart Visual Studio
  • (the PPTools document well saves and restores properly!)
  • Disable Options / Productivity Power Tools / All Extensions / Custom Document Well
  • Restart Visual Studio

And now the builtin document well has resumed saving and restoring properly as well! At least for the moment.

I'm guessing that the builtin "document well" was derived from the one in PPTools, possibly causing the side effect of turning the PPTools on and off.

(I could simply use the PPTools document well all the time. But I can't get the colors therein to work to my satisfaction.)

Hope this helps someone.

Have you tried deleting the .suo file? It may have become corrupted.

Deleting .suo file worked for me. Thanks

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top