Jetbrains Rider Run Config Mac App

To run or debug your code, JetBrains Rider uses the concept of run/debug configurations. In this tutorial, you will learn how to setup and use these configurations.

I know this is an older post but I'm running into same thing running Rider on my Mac. 'Edit Configuration' isn't giving me a choice to change anything. I started a new.NET MVC project. – Randy R Aug 18 '17 at 4:55.

Step 1. Understand run/debug configurations

Run/debug configuration is a set of properties that define how to run and debug code in the current solution. You can have several run/debug configurations in each solution to launch your code in different ways.

You can access run/debug configurations from the Run menu and on the toolbar. When you create a new project that targets an executable (for example, a console application), a suitable run/debug configuration is added automatically from the project template.

So let's create a new project in a new solution using the Console Application template. When the new project is created, take a look at the top right corner — a configuration named Default is created and selected:

Let's study the default configuration.

  1. Click the configuration selector and choose Edit Configurations to open the configurations editor. The Default configuration is selected on the left.

  2. Notice the parent node of the Default configuration — it shows the type of this configuration, .NET Project. There can be multiple configurations of the same type and of different types. In this dialog, configurations are grouped by their types. You can expand the Templates node to see all available configuration types.

  3. Take a look at the properties of the selected configuration. All necessary ones are filled automatically when the configuration is created. For example:

    • Project— defines which project to execute. If your solution contains multiple executable projects, you can create multiple configurations that will launch these projects.

    • Target Framework— defines what version of .NET Framework will be used to execute your code.

    • Exe path— defines which assembly should be executed. If you're targeting a .NET Core application, it could be an .dll file rather than .exe.

    • Program arguments— this optional field lets you pass arguments to your program.

  4. Notice the Before launch properties group, these define what should be done before launching the code. In our case, it's Build project to build the project each time you start the configuration and Activate tool window to bring up the Run window or Debug window. However, you can use these properties for much more complex scenarios, like running some external tool, another run/debug configuration, Gulp or Grant, and many others.

  5. Now, when you have an idea of what a run/debug configuration is, you can close the configurations window.

Step 2. Try out the default configuration

To make our application do something, let's add the following code inside the Main() method:

static void Main(string[] args){ var text = args.Length > 0 && args[0] 'DE' ? 'Hallo Welt!' : 'Hello World!'; Console.WriteLine(text);}

Now we can run the Default configuration to see how it works with our simple 'Hello World' console app. As we saw in its properties, it executes the code without any arguments.

To run the currently selected configuration, which is the Default now, do one of the following:

  • Press Shift+F10,

  • Choose Run | Run 'Default' from the main menu.

  • Click Run 'Default' next to the configuration selector on the toolbar.

As defined in the configuration properties, JetBrains Rider will build your solution, bring up the Run window, and then execute the Main() method of the Console Application project without any arguments.

In the Run window, you will see a new tab for the Default configuration and the output of our program there —Hello World!

Step 3. Use multiple run/debug configurations

As mentioned above, you can have any number of run/debug configurations in your solution. Let's add a new configuration that runs our console app with the DE argument:

  1. Click the configuration selector and choose Edit Configurations to open the configurations editor. The Default configuration is selected on the left.

  2. Copy the Default configuration by clicking Copy Configuration or pressing Ctrl+D.

  3. Rename the copied configuration to Default DE.

  4. Leave all properties of Default DE as is, but add DE to Program arguments.

  5. Click OK to close the dialog.

Now we can choose Default DE in the configuration selector and run it as described above. Our Console Application will receive the DE argument and you will see Hallo Welt! in the output.

When you have multiple run/debug configurations, the Run/debug quick list comes in handy. You can press Alt+Shift+F10 or choose Run | Run... from the main menu to bring up the list of run/debug configurations that you have in the current solution. You can launch or manage your configurations right from this list:

Please do not confuse run/debug configurations with build configurations.

The development units of .NET programs are projects, which are then organized into solutions. Build management follows the same principle so that build preferences are stored in project configurations, which are then managed by solution configurations.

Project build configurations

A project configuration defines how the project should be build, for example, whether to optimize the code and/or include debug information. Different project types allow different sets of build properties.

Run

You can have multiple build configurations for a project so that you can build the same code for different platforms and purposes.
When you create new projects, two project configurations are normally added from project templates: Debug, which is optimized for debugging, and Release, which produces binaries for deploying your code. If necessary, you can add custom build configurations for any project.

When you build a project (either as part of building the entire solution or a selected project only) Rider will use a build configuration that is specified for this project in the currently selected solution configuration.

Configure properties of project build configurations

Jetbrains Rider Run Config Mac App

Jetbrains Rider Download

  1. In the Solution window, right-click the desired project and choose Properties.

  2. In the Project properties dialog that opens, select a project build configuration.

  3. Edit build properties of the selected configuration as needed and click OK to apply your modifications:

Solution build configurations

Jetbrains rider run config mac app download

A solution configuration defines which projects in the solution are build, and which project configurations are used for specific projects within the solution.
Similarly to projects, a newly created solution includes the Debug and Release configurations, which can be complemented by your custom configurations.

You can switch and manage build configurations of the current solution using the corresponding control in the right part of the toolbar:

Manage solution build configurations

Jetbrains Rider Eap

  1. Choose Edit Solution Configurations in the build configurations selector on the toolbar.

  2. In the dialog that opens, expand the solution configuration selector and choose Edit.

  3. This will bring up another dialog where you can choose how to manage solution build configurations.

  4. Choose the desired action (Add, Remove, Edit, or Duplicate).
    If you are creating or editing a solution build configuration, you can specify a name and a platform for it.
    The important thing about managing solution build configuration is that by default, Rider will modify (i.e, add, remove, edit or duplicate) project build configurations that match the name and the platform of the modified solution configuration.
    If you do not want to modify project configurations, clear the corresponding checkbox in the dialog:

  5. Click OK to apply changes in each of the dialogs.

Jetbrains Rider Community

Set up project configurations for the current solution configuration

Jetbrains Rider Community Edition

  1. Choose Edit Solution Configurations in the build configurations selector on the toolbar.

  2. In the dialog that opens, first choose a solution build configuration that you are going to use.

  3. Use the selector next to a project to specify which project build configuration should be used in the current solution build: If necessary, click Edit to bring up another dialog where you can add new or duplicate existing project build configurations.

  4. If you want to exclude some projects from the solution build process, just clear check boxes in the Build column next to the project.
    Note, that you can still build excluded projects — right-click the project in the Solution view and choose Build selected projects.

  5. Click OK to apply changes.