3

I am using Visual Studio 2015

I start Visual Studio, select several start up project using right click context menu

Then I select Save All. Close Visual Studio. Open Visual Studio. Open Set Start Up Projects.

Nothing is saved. I wonder if this setting can be saved in some user settings

sda11
  • 61
  • 1
  • 6
Captain Comic
  • 15,744
  • 43
  • 110
  • 148

3 Answers3

7

Startup project is saved in the Solution User Options (.suo) file.
If Visual Studio does not load it or cannot find it, it will use the default.
Default startup project depends on the order of projects in the solution (.sln) file. You can edit it to change the default startup project.

See this answer for more details.

Community
  • 1
  • 1
Amir Gonnen
  • 3,525
  • 4
  • 32
  • 61
2

https://msdn.microsoft.com/en-us/library/ms165413.aspx Try this out Startup project information does not get written into the .sln file. It gets written to its .sdf file. Please check that the sdf file exists and is writeable. You can delete the .sdf and .suo files to have them re-created.

Abel Masila
  • 736
  • 2
  • 7
  • 25
0

Note: This is a Windows-Specific Solution

I still see this problem in VS2019. It seems like Visual Studio has trouble initially persisting a choice of startup project beyond closing the program. However, once you manage to persist this setting, it seems to work beyond that with no trouble. So to get out of that initial blocked phase where your startup project won't persist, you can follow this workaround thanks to this answer:

  • Close VS if not already
  • Show hidden folders in Windows if you haven't already
  • Delete your .vs folder (it's a hidden folder) (You can alternatively rename it if you're afraid to delete) (You may be able to simply delete the .suo instead)
  • Start Visual Studio (note that a .vs folder will now be created but no .suo yet)
  • Set your startup project in Visual Studio to whatever you like
  • Save your solution
  • Close and re-open VS and confirm your startup project setting has persisted
  • Form here on out you should now be able to switch and persist whatever startup project you like
Colm Bhandal
  • 3,343
  • 2
  • 18
  • 29
  • thx. You made my dev days so much more convinient and better. Looked for the fix for weeks now. – monty Jun 01 '22 at 04:55