Set Multiple Startup Projects in Visual Studio

It's common for developers to work on multiple projects at the same time and they're required to all run in parallel. What I used to do in the past is to start multiple instances of Visual Studio and run a single project in each instance, but I never knew that Visual Studio already had a solution for me that I'm going to share with you guys.

For demonstration purposes I'm going to use a simple Client / Server Scenario. We have the projects created in Visual Studio. See the picture below:

Set-Multiple-Startup-Projects-in-Visual-Studio-1.jpg

In this case, setting a single project as startup isn't sufficient. You want both projects to start up when you press F5. Use the following procedure.

Click on the solution in Solution Explorer and navigate to properties. You can use "Alt+Enter" or you can right-click on the solution and select "Properties" to do so.

Make sure you're in the "Common Properties" -> "Startup Project" area.

Set-Multiple-Startup-Projects-in-Visual-Studio-2.jpg

You can see, by default, "Single startup project" is selected. Click on "Multiple startup projects". This will activate the lower pane for multiple projects settings.

Here you have the options to arrange the order of projects for startup, which should be started first in the last. It provides three actions for each project inside the solution:

  • None: Don't start this project
  • Start: Start with debugging
  • Start without Debugging: Start without attaching the debugger

See the picture below for reference:

Set-Multiple-Startup-Projects-in-Visual-Studio-3.jpg

I've selected "Start" in action for both projects and set the Server first in the order.

Now that I'm done with the settings, on hitting F5, first the server will start and then the client, simple as that. It makes you a little more productive :)

Hope you enjoyed reading this article.

Feedback and comments are highly appreciated. Follow for more!

Up Next
    Ebook Download
    View all
    Learn
    View all