none
ASPNETCORE_ENVIRONMENT in ASP.NET Core 2 RRS feed

  • Question

  • Hi,

    I am trying to understand how ASPNETCORE_ENVIRONMENT variable's value is set.

    By default, for ASP.NET Core 2.0, VS added this variable with a value of "Development". So here, when you run the app in Debug or Release mode, in both cases, the environment is "Development".

    If I remove this variable from the project setting, then by default, running the app in Debug or Release mode, yields to "Production" environment.

    What about when running the app on Azure or IIS? Who decides on this variable? If this variable is defined on the machine, then its value is used? Otherwise, if not defined, by default "Production" is used?

    Thanks

    Bilal

    • Moved by CoolDadTx Monday, April 16, 2018 2:09 PM ASP.NET related
    Monday, April 16, 2018 1:02 PM

All replies