When you open a solution in Visual Studio 2008 (or ealier versions for that matter), it opens all the documents that you did not close before you closed Visual Studio. Is there anyway to turn this functionality off, or a plugin that fixes this behavior? It takes forever to load a solution with 50 files open?
A project is contained within a solution. Despite its name, a solution is not an "answer". It's simply a container for one or more related projects, along with build information, Visual Studio window settings, and any miscellaneous files that aren't associated with a particular project.
Getting Started. After installing, select [View] -> [Other Windows] -> [Working Files List] on the menu bar within Visual Studio. Any open documents should be listed in the tool window.
You can use Solution Explorer to create & manage your solutions and projects and to view & interact with your code.
Have you tried deleting the .suo file?
It's a hidden file that lives beside your solution (sln) file. suo is "solution user options", and contains your last configuration, such as what tabs you left open the last time you worked on the project, so they open again when you reload the project in Visual Studio.
If you delete it, a new 'blank' suo file will be recreated silently.
You can automate the process of closing all the files prior to closing a solution by adding a handler for the BeforeClosing event of EnvDTE.SolutionEvents -- this will get invoked when VS is exiting.
In VS2005, adding the following to the EnvironmentEvents macro module will close all open documents:
Private Sub SolutionEvents_BeforeClosing() Handles SolutionEvents.BeforeClosing DTE.ExecuteCommand("Window.CloseAllDocuments") End Sub
Visual Studio 2008 appears to support the same events so I'm sure this would work there too.
I'm sure you could also delete the .suo file for your project in the handler if you wanted, but you'd probably want the AfterClosing event.
From Visual Studio 2017 Update 8 there is an option in projects and solutions which you can use to enable this:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With