JetBrains Rider 2024.1 Help

Publish .NET applications to folder

One of the ways to deploy an application is to pack all its files to a folder and then share this folder with others. This may be helpful when testing the application or sending it to a dedicated deployment team.

The first thing you need to do is create a run configuration that determines what and how should be published.

Create a configuration for publishing

  1. Open the Run/Debug Configuration dialog in one of the following ways:

    • Select Run | Edit Configurations from the main menu.

    • With the Navigation bar visible (View | Appearance | Navigation Bar), choose Edit Configurations from the run/debug configuration selector.

    • Press Alt+Shift+F10 and then press 0.

  2. In the Run/Debug Configuration dialog, click Add New Configuration Add New Configuration Alt+Insert, choose the Publish to folder configuration type, and specify a name that will help you identify this configuration in the future.

  3. Optionally, adjust the common settings of the configuration and configure before launch tasks.

  4. Select the main project of your application in the Project field and specify its parameters, which are explained in the table below.

    JetBrains Rider: Run/Debug Configuration: Publish to Folder
  5. Click Apply to save the configuration.

You can set the following parameters of the Publish to Folder configuration:

Target location

Use this field to specify where to deploy application files.


Select a build configuration.

Target framework

Lets you change the .NET framework version that the project targets. For more information, refer to Framework targeting overview and Target frameworks in SDK-style projects on Microsoft Docs.

Deployment mode

  • Framework-Dependent — only deploys your code and relies on .NET framework installed on the target machine.

  • Self-Contained — deploys all code (including the framework) required to execute your application on any machine.

For more information, refer to Microsoft Learn. .NET application publishing overview.

Target runtime

If you are not sure where the application is going to be executed, choose Portable. The downside of this option is that the target machine will have to JIT compile your application each time it runs.

Otherwise, select a specific runtime identifier (RID) from the list or specify a custom one. For more information, refer to Microsoft Learn. .NET RID Catalog.

Enable ReadyToRun compilation

This option may help improve startup performance of the application, but on the other hand, the size of the artifact will grow. For more information, refer to Microsoft Learn. ReadyToRun Compilation.

Trim unused assemblies

This option is available for the self-contained deployment mode and lets you trim unused dependencies. For more information, refer to Microsoft Learn. Trim self-contained deployments and executables.

Produce single file

Use this option to compile all application files into a single binary file. For more information, refer to Microsoft Learn. Single-file deployment and executable.

Delete existing files

Will delete all the existing files in the deployment location before deploying the application.

When you a ready to publish your application, select the created run configuration on the toolbar and click Run Shift+F10:

JetBrains Rider. JetBrains Rider: Run/Debug Configuration: Publish to Folder. Run
Last modified: 17 April 2024