How to set multiple startup projects in Visual Studio

Since VS2019, you can set multiple startup projects in the solution’s properties. This is useful when you have multiple projects in the same solution that you want to start at the same time (with or without debugging). Before this, you’d have to set a project as the startup project, start it, then repeat with all the projects you wanted to start – quite tedious!

Here’s how to set multiple startup projects:

  • Right-click the solution and click Properties. Or click the shortcut “Set Startup Projects…”.
  • Go to the Startup Project section.
  • Select Multiple startup projects.
  • For each project you want, set them to Start.
  • Click Apply.
Visual Studio Solution Property Pages, showing multiple start projects set to Start

For the best results, I’d suggest setting all of the target projects to Start. This gives you the flexibility of starting the projects with or without the debugger.

Note: To reset back to using a single startup project, you can right-click on the project of choice and select Set as Startup Project. No need to go through the solution Property Pages to do that.

Things to avoid

I wouldn’t suggest setting any project to Start without debugging.

If you have all projects set to Start without debugging, you won’t be able to start the debugger and you’ll get an error dialog: Unable to start debugging. The startup project cannot be launched. It may also just fail silently depending on how you tried to start the debugger. That’s pretty annoying. Compare this with setting all projects to Start, which allows you to start all projects with or without the debugger at will. Much better.

Furthermore, in my testing, I was getting strange results when using of a mix of Start without debugging and Start, like some projects seemingly not launching at all. Better to just set all projects to the same thing.

One more thing to avoid: Be aware that the multiple startup projects list shows ALL projects, including ones that cannot be used as startup projects. Just set those to None (which is the default anyway).

Comments are closed.