I have ASP.Net Core 2.1 API app. It is supposed to host in 4 environments.
- Development
- Testing
- Staging
- Production
When running the app in local from Visual Studio, the app is rightly fetching the ASPNETCORE_ENVIRONMENT variable & accordingly fetching the values from appsettings.Development.json
But when the same deployed in a VM, it's not fetching the environment & looking for settings (like Connection string etc.) from appsettings.json.
What else settings I need to do so?
Thanks!


dotnet run( i.e. inside Visual Studio), it's more than useless for deployment to IIS.Boption is easier.