My open documents(tabs) keep disappearing in VS2010 SP1

心不动则不痛 提交于 2019-12-07 12:59:40

问题


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.


回答1:


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




回答2:


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)




回答3:


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.

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.




回答4:


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




回答5:


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.




回答6:


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



来源:https://stackoverflow.com/questions/5340889/my-open-documentstabs-keep-disappearing-in-vs2010-sp1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!