Selecting profiles with multiple startup projects
Asked Answered
P

3

15

I have a VS 2017 solution that I have 3 separate MVC Core 2.0 web projects. Each project has the same three profiles setup to run. When I select any one of the 3 sites as the startup project I get an option to select which profile I want to run. The problem I have is when I select all three as Multiple Startup Projects I no longer have the option to select which profile to run. How would I go about setting this up so I can debug all 3 sites and select which profile I want to run as?

Thanks

Pinnatifid answered 21/2, 2018 at 18:42 Comment(0)
P
15

I ended up finding this great extension called SwitchStartupProject that was exactly what I was looking for.It creates a file that you can highly customize. It is pretty simple and has a good wiki to help you get up and running.

SwitchStartupProject fro VS 2017

Pinnatifid answered 7/2, 2019 at 20:5 Comment(1)
The wiki content has moved to heptapod.host/thirteen/switchstartupproject/blob/branch/current/…Pilpul
C
27

I'm a little late to this, but I was having the same issue; it turns out the solution is rather simple.

Visual Studio doesn't show you this in anyway, but when starting multiple projects it will actually run the last profile you had selected.

So all you have to do is go to each project as a single start up project, select the profile, and then switch to multiple startup projects.

Hope that helps!

Corotto answered 29/3, 2018 at 13:12 Comment(4)
You are correct. I had discovered this as well but find it very annoying for situations where there are many projects and you need to quickly change all of the profiles. I was hoping someone would have a better solution but I think this is the best we can get at this point so I will mark it as the answer. I will put in a feature request for this to be added.Pinnatifid
@Pinnatifid would you post a link to your feature request here? I'd like to upvote the suggestion also. I wish there was someway to save a named <Multiple Startup Projects> config - wherein for each project, I can select not only the ordering and action of the projects, but also the launch profile.Jainism
This solution is not simple but stupid. that looks like a magic and uncomfortable as well. in VS 2019 many times I've to switch between development/testing/staging modes for my 6 projects solution and the only way that I know is select each of the project one by one, change their start profile and go back to solution properties to mark multiple startup projects again. It's costing me quite a bit of time and a lot of frustration. My life saver happened to be: marketplace.visualstudio.com/…Maynard
One other thing you can do, also not that simple, is edit the projectname.csproj.user file manually - change the ActiveDebugProfile to your profile name.Outwash
P
15

I ended up finding this great extension called SwitchStartupProject that was exactly what I was looking for.It creates a file that you can highly customize. It is pretty simple and has a good wiki to help you get up and running.

SwitchStartupProject fro VS 2017

Pinnatifid answered 7/2, 2019 at 20:5 Comment(1)
The wiki content has moved to heptapod.host/thirteen/switchstartupproject/blob/branch/current/…Pilpul
H
2

Please know that in 2024 there is also a visual studio option that allows switching between multiple "multi-launch" setups: It can be activated here: Environment - Preview Features - Enable Multi-Project Launch profiles

Hanrahan answered 18/7 at 8:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.