29

I'm working on a project for a upcoming job interview. I'm used to writing C# in Visual Studio, but since I've changed to Linux, I'm trying to use Rider.

In Visual Studio you can add multiple projects as your 'Startup Project', and I'm not sure how to do this in Rider.

My file structure is:

BlazorApp
│   README.md
│   .gitignore    
│
└───MyApp.Web(Blazor project)
│
│___MyApp.Api(ASP.NET Core Web App with the API template)
│   
└───MyApp.Models(Class library)

Where MyApp.Api should start first and afterwards MyApp.Web.

denn4617
  • 303
  • 3
  • 5

1 Answers1

50
  1. In the run config drop down, select "Edit Configuration..."
  2. At the top of the left hand menu, click "+"
  3. Find and select "Compound"
  4. Name it
  5. Use the "+" button to add the projects you'd like to start together
  6. Select that configuration when you run it

Edit the confuration:
enter image description here

Find and select the Compound configuration:
enter image description here

Add the projects:
enter image description here

Select it when you run it:
enter image description here

Note


The compound configuration is just a grouping of existing run configurations so if you need to set environment variables or program or runtime arguments, you can:

  1. In the run config drop down, select "Edit Configuration..."
  2. Click on the run configuration you need to update from the left hand menu
  3. Make the desired updates on the right hand side
  4. Save the changes.

enter image description here

ChiefTwoPencils
  • 13,548
  • 8
  • 49
  • 75
  • Are you able to set runtime arguments? I am not seeing a way to do that (I want to run the same project with different arguments) – Joe Phillips Dec 01 '22 at 21:28
  • @JoePhillips, see if the latest update at the bottom helps any. – ChiefTwoPencils Dec 02 '22 at 04:01
  • How do you setup this to run only one of those projects in debug mode? Alternatively how can you tell the debugger to stop on breakpoint of a specific project and ignore the same breakpoint in other projects? – Curtwagner1984 Mar 29 '23 at 10:53
  • @Curtwagner1984, I'm not sure I understand. Are you asking how to run multiple instances of the same project? – ChiefTwoPencils Mar 29 '23 at 17:58
  • 1
    @ChiefTwoPencils Yes. I figured it out, I just made two different configurations for the same project with different command arguments and put them both in compound. And it works exactly how I want. – Curtwagner1984 Apr 05 '23 at 10:53