Reputation: 7708
I have "Development" set in my web.config, in the launchSettings.json (all profiles), and in the environment variables on Windows, but the application still shows the environment as "Staging". Also, even if I run Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") in something like RoslynPad, it also shows "Staging". I do not know where else I can look to set this value. Thank you.
The Environment Context is still "Staging".
Upvotes: 0
Views: 1229
Reputation: 7708
As Rena suggested, restarting VS helped fix the issue, and ensuring I did a clean and removing any/all environment variables defined on the OS now allows me to change the environment using the web.config.
Upvotes: 1