Is it possible to open a project in Visual Studio 2008 without opening all the files that were previously opened last time I had the project open. I have a habit of keeping many files open as I am working on them, so next time I open the project, it (very slowly) loads up a bunch of files into the editor that I may not even need open. I have searched through the settings and cannot find anything to stop this behavior.
相关问题
- How to know full paths to DLL's from .csproj f
- Importing NuGet references through a local project
- the application was unable to start correctly 0xc0
- Visual Studio 2019 - error MSB8020: The build tool
- 'System.Threading.ThreadAbortException' in
相关文章
- How to show location of errors, references to memb
- How to add external file to application files ( cl
- How to track MongoDB requests from a console appli
- Visual Studio Hangs on Loading UI Library
- How to use Mercurial from Visual Studio 2010?
- Copy different file to output directory for releas
- Edit & Continue doesn't work
- “Csc.exe” exited with code -1073741819
I never realized how much that annoyed me as well! I haven't been able to find a setting, but in
Options > Environment > Keyboard
you can bind a shortcut toWindow.CloseAllDocuments
.ALT+X
was unbound for me so I just used that. I'm interested if there's some hidden setting to automatically do this on solution exit though (or load).I was hoping for something a little more automatic. VS will create a new .suo file every time the project is saved. So I would have to delete that file every time I open the project. I also don't want to have to remember to close all the files before closing VS.
Other IDEs that I have used have similar functionality, but also make it rather simple to turn on/off.
Thanks for your help.
Simply delete the .suo file. It contains the list of open files.
A bit of research turns up the fact that you can do it with a macro:
EnvironmentEvents
in Macro Explorer. (For details, see here.)EnvironmentEvents
module.Put in this code:
Try the following:
If you have a repository you might want to check that file in.
I suggest this because I was having the reverse problem, where it wasn't opening my old files automatically, and the cause was a .suo file that had been checked into the repository and was (for some reason) not being overwritten by Studio. The file wasn't even write protected.
Or you can close all open document from the Window menu before closing VS.