I am trying to setting up multiple environments in my .NET Core 2.0 application. See my code below.
\"configuratio
dotnet run --environment makes no effect on ASPNETCORE_ENVIRONMENT environment variable, see this issue.
Here's a detailed instruction on how to switch environments in a multiple ways: https://docs.microsoft.com/en-us/aspnet/core/fundamentals/environments
For example, you can run it from a Command line (before dotnet run): set ASPNETCORE_ENVIRONMENT=Development