What's a good way to setup configuration for environments? (appsettings)
Original message was deleted
One annoying issue I'm having is that local secrets in secrets.json only work in Developmentthats literally the purpose of user secrets thou? in what other scenarios would you load them locally?
Development for anything except local devDevelopmentProductionProductionProduction as its "environment name" by defaultEverybody has a testing environment. Some people are lucky enough enough to have a totally separate environment to run production in.
config.AddJsonFile(...) line that reads from an env-var to decide what file to read in thouASPNETCORE_ENVIRONMENT is that it maps to an enum that only has Production and Development as optionsStaging valueDevelopmentDevelopmentDevelopmentProductionProductionProductionProductionconfig.AddJsonFile(...)ASPNETCORE_ENVIRONMENTStaging