Search code examples
c#visual-studioblazorjetbrains-iderider

Multiple Startup projects in Solution, in Rider


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.


Solution

    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