<p>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.  </p>

[{'answer_id': 16079, 'author': 'Biri', 'author_id': 968, 'author_profile': 'https://Stackoverflow.com/users/968', 'pm_score': 5, 'selected': False, 'text': '<p>Simply delete the .suo file.\nIt contains the list of open files.</p>\n'}, {'answer_id': 16084, 'author': 'Greg Hurlman', 'author_id': 35, 'author_profile': 'https://Stackoverflow.com/users/35', 'pm_score': 2, 'selected': False, 'text': '<p>Edit: Totally read the question wrong at first - ignore my first (now gone) answer. :)</p>\n\n<p>I changed the keyboard mapping for CTRL-SHIFT-C from bringing up the Class View to closing all document windows - something I use several orders of magnitude more often - and then I just clear my workspace before closing a solution.</p>\n'}, {'answer_id': 16088, 'author': 'Biri', 'author_id': 968, 'author_profile': 'https://Stackoverflow.com/users/968', 'pm_score': 0, 'selected': False, 'text': '<p>Or you can close all open document from the Window menu before closing VS.</p>\n'}, {'answer_id': 16184, 'author': 'Mikey P', 'author_id': 1749, 'author_profile': 'https://Stackoverflow.com/users/1749', 'pm_score': 2, 'selected': False, 'text': "<p>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.</p>\n\n<p>Other IDEs that I have used have similar functionality, but also make it rather simple to turn on/off.</p>\n\n<p>Thanks for your help.  </p>\n"}, {'answer_id': 16251, 'author': 'travis', 'author_id': 1414, 'author_profile': 'https://Stackoverflow.com/users/1414', 'pm_score': 3, 'selected': False, 'text': "<p>I never realized how much that annoyed me as well! I haven't been able to find a setting, but in <code>Options &gt; Environment &gt; Keyboard</code> you can bind a shortcut to <code>Window.CloseAllDocuments</code>. <code>ALT+X</code> 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).</p>\n"}, {'answer_id': 57848, 'author': 'Ryan Lundy', 'author_id': 5486, 'author_profile': 'https://Stackoverflow.com/users/5486', 'pm_score': 5, 'selected': False, 'text': '<p>A bit of research turns up the fact that you can do it with a macro:</p>\n\n<ul>\n<li>Create a new macro (or use an existing one).  You should see a module called <code>EnvironmentEvents</code> in Macro Explorer.  (For details, see <a href="http://msdn.microsoft.com/en-us/library/ee1f34as.aspx" rel="noreferrer">here</a>.)</li>\n<li>Open the <code>EnvironmentEvents</code> module.</li>\n<li><p>Put in this code:</p>\n\n<pre><code>Public Sub CloseDocsOnExit() Handles SolutionEvents.BeforeClosing\n    DTE.ExecuteCommand("Window.CloseAllDocuments")\nEnd Sub\n</code></pre></li>\n<li>Save and Build the macro.</li>\n<li>Open a whole bunch of documents in your solution, then close Visual Studio.</li>\n<li>Yay!  No more open documents!</li>\n<li>(Note: Despite that it says SolutionEvents, it also works if you\'re working on a project that doesn\'t have a solution.)</li>\n</ul>\n'}, {'answer_id': 1274282, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 2, 'selected': False, 'text': "<p>Try the following:</p>\n\n<ol>\n<li>Close the program after closing all files.</li>\n<li>Make a copy of [whatever].suo</li>\n<li>Open the solution again, open some files, and exit.</li>\n<li>Copy (don't move) the old .suo file over the one that was just generated.</li>\n<li>Make the .suo file read only.</li>\n</ol>\n\n<p>If you have a repository you might want to check that file in.</p>\n\n<p>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.</p>\n"}, {'answer_id': 2697153, 'author': 'gal', 'author_id': 323998, 'author_profile': 'https://Stackoverflow.com/users/323998', 'pm_score': -1, 'selected': False, 'text': '<p>The only way works for me is : change the project location and again reopen the solutions form there. :)</p>\n'}, {'answer_id': 8097293, 'author': 'sam', 'author_id': 335362, 'author_profile': 'https://Stackoverflow.com/users/335362', 'pm_score': 0, 'selected': False, 'text': '<p>In Visual Studio 6.0 (VC++), the procedure is slightly different.</p>\n\n<p>Delete the .ncb file (located normally in the same place as your .dsp or .dsw files).</p>\n'}]
['https://Stackoverflow.com/questions/16074', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1749/']