
โ Do not edit this section. It is required for docs.microsoft.com โ GitHub issue linking.
IHostingEnvironment is deprecated
Yes, I'll be getting to this topic soon ... either Saturday or Sunday I think.
Enjoy your weekend
I _just realized_ ... @Rick-Anderson reassigned this to himself. _GOOD!_ :smile: I've got too much on my plate for this release. ๐๐๐๐๐๐๐๐๐๐๐๐
@dougbu besides IHostingEnvironment is deprecated - anything else changed for 3.0 we should document?
Have a look at the 3.0.0 announcements @Rick-Anderson
So just to understand, if ASPNETCORE_ENVIRONMENT either isn't set or is set to Production, means that we are on a Production environment. Is this the same for AZURE_FUNCTION_ENVIRONMENT? I find it difficult to make a distinction between those two. Especially when the azure Function is written in. NET Core.
It seems like the prefix has changed:
https://docs.microsoft.com/en-us/dotnet/api/microsoft.extensions.hosting.host.createdefaultbuilder?view=dotnet-plat-ext-3.0
// โข load host Microsoft.Extensions.Configuration.IConfiguration from "DOTNET_"
// prefixed environment variables ///
A least for generic host it is not ASPNETCORE_ENVIRONMENT but DOTNET_ENVIRONMENT.
Docs should be updated to reflect this
@ArgTang They both work.
Engineering indicated to us that they prefer that we stick with ASPNETCORE_ENVIRONMENT in terms of what the docs generally suggest.
Feels like a clarification is needed (maybe ๐ค). The coverage in the Generic Host topic describes both ...
https://docs.microsoft.com/en-us/aspnet/core/fundamentals/host/generic-host?view=aspnetcore-3.0#default-builder-settings
... but it doesn't say last one WINS! That remark is over here ...
https://docs.microsoft.com/en-us/aspnet/core/fundamentals/environments?view=aspnetcore-3.0#set-the-environment
Most helpful comment
Yes, I'll be getting to this topic soon ... either Saturday or Sunday I think.