visual studio not remembering open documents & startup project
For the past week, something has changed about my VS solution, and I havent found a setting to fix it yet.
When I close the solution and restart:
- the start-up project reverts to a different one than was selected when I last closed
- my project heirarchy is not what it was when it closed - every project is expanded
- the documents that were open when closed are all closed
In each case I want the solution to look just like it did when I closed it last.
How do I make that happen?
Cheers,
Berryl
Solution 1:
I believe this information all lives in your .suo
file and/or .user
file. If they've become corrupt, VS will struggle, so it'll revert to the default.
Maybe try exiting VS, deleting the .suo
and/or .user
files, start VS and set it up how you want, restart it again and see if it remembered the settings.
Solution 2:
I ran into this problem in Visual Studio 2015. Removing the .suo file in the solution root did not fix the problem. I needed to remove everything under the following directory:
\\SolutionRootFolder\.vs\FolderWithSolutionName\v14\
.vs is a hidden folder and .suo is a hidden file under the v14 folder that must be deleted along with the vbcs.cache folder.
Update for VS2017: The problem still exists in VS2017 with the v15 folder.
Solution 3:
In Visual studio 2015 :
Tools -> Import and Export Settings -> Reset all settings
It worked for me.
Happy coding :)
Solution 4:
This doesn't address the startup project issue, but checking the "Reopen documents on solution load" checkbox fixed the remembering open documents issue for me.
You can change that setting here:
Tools -> Options -> Projects and Solutions -> General -> Reopen documents on solution load
Not sure if that checkbox existed before I upgraded Visual Studio 2017 to version 15.8.3 or if it got reset somewhere along the way
Solution 5:
I had the same problem and tried removing the .suo file. However, that did not fix the project. I then tried the 'reset' option which worked perfectly.