Set Multiple Startup Projects

Introduction

This is a very useful feature of Visual Studio, but I haven't seen many people using it. If your application has mutiple projects, you can actually set multiple projects as startup projects. In this quick tip, we'll see how that is done.

How to do it? 

Using this feature, once you set your choice of projects as the startup project, those projects will run at the same time when you start the debugger. Let's suppose I have a solution named "MyApp" and it consists of 2 projects, such as "MyWebApp" and "MyWebAPI". To work with MyWebApp, it requires MyWebAPI for various database operations. Here are the steps to launch both the projects at the same time.

Here is how my Solution Explorer looks -

Visual Studio

Right click on the Solution and select "Set StartUp Projects...".

Visual Studio

A pop-up window like the following should appear. The default selection should be on "Single StartUp Project".

Visual Studio

Select "Multiple StartUp Projects" and click on the "Action" field of the respective projects and select "Start".

Visual Studio
 
Now, when you start debugging (RUN) these, both of the projects will be launched.

I hope this small tip will be helpful.
Ebook Download
View all
Learn
View all