September 18th, 2024

Multi-Project Launch Configuration

Nayana Srikanth
Senior Product Manager

Are you tired of the hassle of manually configuring your development environment every time you want to launch multiple projects? We’ve heard your feedback and are thrilled to announce a feature in Visual Studio that simplifies your workflow.

The Multi-Project Launch Configuration feature in Visual Studio allows developers to set up and save profiles for launching specific projects within a multi-project solution in predefined states for debugging. This simplifies the process of working with complex solutions, improves debugging efficiency, and enables easy sharing of configurations among team members.

Video titled: Multi-Project Config.mov

Enabling Multi Launch Profile:

The Multi-Project Launch Configuration is available in version 17.11. Enable the feature flag with the instructions below to start using it.

In Visual Studio, navigate to Tools > Options > Preview Features and toggle the checkbox for “Enable Multi Launch Profiles” to activate the feature.

image of a checkbox selection for enabling Multi-Project Launch

Creating Multi Launch Profile:

  • Open your Visual Studio solution that contains multiple projects.
  • Go to the “Solution Explorer” on the right side of the Visual Studio window.
  • Right-click on your solution (the top-level item in the Solution Explorer) and select “Configure Startup Projects…”.

Image of Solution explorer with Configure Startup Projects highlighted

  • In the Solution Property Pages, click on the “Common Properties” tab, and select “Configure Startup Projects”.

In the Solution Property Pages, Common Properties tab, Configure Startup Projects, Select Multiple startup projects

  • In the “Configure Startup Projects” section, choose the “Multiple startup projects” radio button.
  • Below the radio button, you’ll see a list of all the projects in your solution.
  • Set the action for each project to either “Start,” “Start without debugging,” or “None,” and select debug target depending on your requirements.

Image selecting a project and selecting "Start" as action

  • Enabling the “Share Profile” checkbox allows you to share the profile with the team by checking it into the config file in the Source Control repo.
  • Launch profiles are saved to a JSON file in the same directory as the solution. The “Share Profile” checkbox determines whether the profile is saved to a user-specific file (unchecked) or to a file intended for source control tracking, such as in Git (checked).

Image of multiple projects being selected as "Start"

  • Once you’ve configured the startup action for each project, click the “OK” or “Apply” button to save the profile.
  • The created launch profile appears in the toolbar dropdown list, allowing you to select the profile you want to debug.

Image of Feature Profile dropdown showing multiple projects to start debugging

Engage with us!

We would love to get your feedback on Multi Project Config, so please give it a try and let us know what you think! You can share any feedback via Developer Community to help us make Visual Studio better for you!

Author

Nayana Srikanth
Senior Product Manager