No matter when or where I set either ASPNET_ENV or Hosting:Environment the startup code will always enter
//This method is invoked when ASPNET_ENV is 'Production'
//The allowed values are Development,Staging and Production
public void ConfigureProduction(IApplicationBuilder app, ILoggerFactory loggerFactory)
{
loggerFactory.AddConsole(minLevel: LogLevel.Warning);
Configure(app);
}
What I've tried so far
- Set
Hosting:EnvironmenttoDevelopmentin the project properties - Set
ASPNET_ENVtoDevelopmentin the project properties - Set
Hosting:EnvironmenttoDevelopmentinlaunchSettings.json - Set
ASPNET_ENVtoDevelopmentinlaunchSettings.json - Set
ASPNET_ENVtoDevelopmentin code viaEnvironment.SetEnvironmentVariable("ASPNET_ENV", "Development");in theStartupmethod before the call toConfigurationBuilder.GetEnvironmentVariables()
This is version 1.0.0-rc2-20143 by the way. Am I missing something here or is it just a bug?
