Default ASP.NET Core web project contain such lines in Startup.cs:
if (string.Equals(env.EnvironmentName, \"Development\", StringComparison.Ordi
In ASP.NET Core RC2 the variable name is has been changed to ASPNETCORE_ENVIRONMENT
e.g. In Windows you can execute this command on the staging server (with admin rights)
SETX ASPNETCORE_ENVIRONMENT "Staging" /M
This only has be be executed once and after that, the server will always be considered as the staging server.
When you do a dotnet run in the command prompt on that server you will see Hosting environment: Staging