JetBrains Rider - configure appsettings overrides

Viewed 13938

I am trying JetBrains Rider for my existing .NET Core project. In the project I have several appsettings.json overrides:

  • appsettings.Development.json - for development
  • appsettings.Test.json - for testing
  • appsettings.Staging.json - for staging environment
  • etc.

In Visual Studio, the overrides work perfectly and I always get my Development override, when running the app in debug mode. However, in Rider I am getting the default appsettings.json values, which are not suitable for debugging and development. How do I change the settings to get the values from the correct override?

3 Answers

For the Mac interface:

  1. Choose the config you wish the to change the environment

  2. Select Environment variables

  3. Choose 'Development' or 'Production'

The accepted answer didn't work for me. I had to enter the environment variable ASPNETCORE_ENVIRONMENT=Development in to the "Runtime arguments" field:

enter image description here

enter image description here

enter image description here

Related