12

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

user1041169
  • 639
  • 2
  • 9
  • 18

2 Answers2

23

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!

Slamma009
  • 339
  • 1
  • 1
  • 3
  • 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. – user1041169 Jul 12 '18 at 17:19
  • @user1041169 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* config - wherein for each project, I can select not only the ordering and action of the projects, but also the launch profile. – Matthew Jan 23 '19 at 15:57
  • 4
    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: https://marketplace.visualstudio.com/items?itemName=vs-publisher-141975.SwitchStartupProjectForVS2019 – WSK May 14 '20 at 13:46
  • 1
    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. – denvercoder9 Jan 26 '22 at 15:28
12

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

GaussZ
  • 838
  • 10
  • 25
user1041169
  • 639
  • 2
  • 9
  • 18
  • The wiki content has moved to https://heptapod.host/thirteen/switchstartupproject/blob/branch/current/Configuration.md – x5657 Feb 21 '22 at 10:14