Merge branch 'release' into dev
This commit is contained in:
commit
4cad0a2f01
|
|
@ -63,7 +63,6 @@ namespace Microsoft.AspNetCore.Hosting.Internal
|
||||||
|
|
||||||
hostingEnvironment.EnvironmentName =
|
hostingEnvironment.EnvironmentName =
|
||||||
options.Environment ??
|
options.Environment ??
|
||||||
Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") ??
|
|
||||||
hostingEnvironment.EnvironmentName;
|
hostingEnvironment.EnvironmentName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,21 @@ namespace Microsoft.AspNetCore.Hosting
|
||||||
_hostingEnvironment = new HostingEnvironment();
|
_hostingEnvironment = new HostingEnvironment();
|
||||||
_configureServicesDelegates = new List<Action<IServiceCollection>>();
|
_configureServicesDelegates = new List<Action<IServiceCollection>>();
|
||||||
_configureLoggingDelegates = new List<Action<ILoggerFactory>>();
|
_configureLoggingDelegates = new List<Action<ILoggerFactory>>();
|
||||||
|
|
||||||
|
// This may end up storing null, but that's indistinguishable from not adding it.
|
||||||
|
UseSetting(WebHostDefaults.EnvironmentKey, Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT")
|
||||||
|
// Legacy keys, never remove these.
|
||||||
|
?? Environment.GetEnvironmentVariable("Hosting:Environment")
|
||||||
|
?? Environment.GetEnvironmentVariable("ASPNET_ENV"));
|
||||||
|
|
||||||
|
if (Environment.GetEnvironmentVariable("Hosting:Environment") != null)
|
||||||
|
{
|
||||||
|
Console.WriteLine("The environment variable 'Hosting:Environment' is obsolete and has been replaced with 'ASPNETCORE_ENVIRONMENT'");
|
||||||
|
}
|
||||||
|
if (Environment.GetEnvironmentVariable("ASPNET_ENV") != null)
|
||||||
|
{
|
||||||
|
Console.WriteLine("The environment variable 'ASPNET_ENV' is obsolete and has been replaced with 'ASPNETCORE_ENVIRONMENT'");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue