You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your question related to a specific version? If so, please specify:
Function runtime v2
What language does your question apply to? (e.g. C#, JavaScript, Java, All)
C#
Question
When running a C# function in Visual Studio, I notice that an environment variable called "AZURE_FUNCTIONS_ENVIRONMENT" is set to Development? How is this variable used? Is AZURE_FUNCTIONS_ENVIRONMENT to functions what ASPNETCORE_ENVIRONMENT is for asp dotnet core web apps?
I am planning to use on those two variables to load an environment specific settings file: appsettings.{environmentname}.json, and I am wondering which one is the right approach?
The text was updated successfully, but these errors were encountered:
You'll want to use AZURE_FUNCTIONS_ENVIRONMENT. The Functions runtime that powers a Function app on Azure is the WebHost project in this repo. As the host is initializing, it looks for the AZURE_FUNCTIONS_ENVIRONMENT app setting (as EnvironmentSettingNames.EnvironmentNameKey) and passes it to the IWebHostBuilder. Using only ASPNETCORE_ENVIRONMENT can lead to desired behavior changes and telemetry being missed.
Is your question related to a specific version? If so, please specify:
Function runtime v2
What language does your question apply to? (e.g. C#, JavaScript, Java, All)
C#
Question
When running a C# function in Visual Studio, I notice that an environment variable called "AZURE_FUNCTIONS_ENVIRONMENT" is set to Development? How is this variable used? Is AZURE_FUNCTIONS_ENVIRONMENT to functions what ASPNETCORE_ENVIRONMENT is for asp dotnet core web apps?
I am planning to use on those two variables to load an environment specific settings file: appsettings.{environmentname}.json, and I am wondering which one is the right approach?
The text was updated successfully, but these errors were encountered: