I'm creating my CI pipeline in VSO and I have .net core app, I created endpoint which says to me which value was used during publishing, exposing IHostingEnvironment.EnvironmentName
through the API, no matter what I do, it's set to Produciton
. My app is hosted in Azure.
The steps I did -
I looked into Azure App Service 's application settings, looking for environment. Thinking that might overwrite my variable in Release configuration.
I set ASPNETCORE_ENVIRONMENT
variable on variables tab in release configuration, also I set it on specific environment.
setting it on release configuration:
And I'm also ruining the command setx
with parameter ASPNETCORE_ENVIRONMENT "Test"
.
None of the above seems to make any difference, when I query my endpoint I got back I'm running on Production
environment. Any help is much appreciated.