You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/ide/how-to-set-multiple-startup-projects.md
+74-2Lines changed: 74 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: 'Set multiple startup projects'
3
-
description: Discover the Visual Studio process that allows you to specify how more than one project is run when you start the debugger.
4
-
ms.date: 11/01/2023
3
+
description: Discover the Visual Studio process that allows you to specify how more than one project is run when you start the debugger, and create launch profiles you can share with others.
@@ -28,6 +28,78 @@ Some project templates include multiple projects that are already configured to
28
28
29
29
4. Choose the **Multiple Startup Projects** option and set the appropriate actions.
30
30
31
+
## Multi-project launch profiles
32
+
33
+
You can 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.
34
+
35
+
### Enable multi-project launch profile
36
+
37
+
Multi-project launch profiles are available in Visual Studio 2022 17.11 and later. To enable or disable the **Multi-project Launch Profiles** feature, go to **Tools > Options > Preview Features** and toggle the checkbox for **Enable Multi Launch Profiles**.
38
+
39
+
:::image type="content" source="media/launch-multiple-projects/tools-options-enable-multi-project-launch.png" alt-text="Screenshot showing the option to enable Multi-project Launch Profiles in the Tools Options dialog." border="true":::
40
+
41
+
### Create a multi-project launch profile
42
+
43
+
1. Open your Visual Studio solution that contains multiple projects.
44
+
1. In Solution Explorer, right-click on your solution, and select **Configure Startup Projects...**.
45
+
46
+
You can also press **Ctrl**+**Q** (Quick Launch) and search for "Configure startup projects" in Feature Search.
47
+
48
+
:::image type="content" source="media/launch-multiple-projects/quick-launch-configure-startup-projects.png" alt-text="Screenshot showing searching for configure startup projects in Feature Search." border="true" :::
49
+
50
+
The **Solution Property Pages** dialog appears.
51
+
52
+
1. In the Solution Property Pages, click on the **Common Properties** tab, and select **Configure Startup Projects**.
53
+
1. In the **Configure Startup Projects** section, choose the **Multiple startup projects** radio button.
54
+
55
+
:::image type="content" source="media/launch-multiple-projects/solution-property-pages.jpg" alt-text="Screenshot showing the Multiple startup projects radio button." border="true" lightbox="media/launch-multiple-projects/solution-property-pages.jpg":::
56
+
57
+
Below the radio button, you'll see a list of all the projects in your solution, and whether they are set to be launched or not when you press **F5**, and whether each project is started under the debugger or without debugging.
58
+
59
+
You can use the up and down arrows to control the order in which projects will be launched.
60
+
61
+
1. Set the action for each project to either **Start**, **Start without debugging**, or **None**, and select a debug target depending on your requirements.
62
+
63
+

64
+
65
+
1. Enable the **Share Profile** checkbox if you want to share the profile with other Visual Studio users by checking it into the configuration file in the Source Control repo.
66
+
Launch profiles are saved to a JSON file with the extension `.slnLaunch` 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).
67
+
68
+
:::image type="content" source="media/launch-multiple-projects/share-profile.png" alt-text="Screenshot that shows the Share Profile checkbox on the Solution Property pages dialog." border="true":::
69
+
70
+
Here's an example of the profile in the `.slnLaunch` file:
1. Once you've configured the startup action for each project, click the **OK** or **Apply** button to save the profile.
99
+
The created launch profile appears in the toolbar dropdown list, allowing you to select the profile you want to debug.
100
+
101
+
:::image type="content" source="media/launch-multiple-projects/profile-in-toolbar.png" alt-text="Screenshot showing launch profile in toolbar.":::
102
+
31
103
## With Docker Compose
32
104
33
105
When you're using Docker Compose to launch containerized projects on a local machine, you use a different method (launch profiles) to start multiple projects.
0 commit comments