❔ How do I use the appsetting.development?
Hey i got 2 files, 1 for prod 1 for development, i want to load the dev one when im working on my machine, whats the best way to do it?
6 Replies
"load" as in?
as in use the connection string etc
different connection string different variables
Generally this is done with environment variables. Setting ASPNETCORE_ENVIRONMENT to "development", but there are situations where that wouldn't work
Yeah i've done it, but how does it know to load the correct file?
and another question is, why doesnt my gui show the different enviroment options? i need to activate it somehow?
If you are using
Host.CreateDefaultHostBuilder()
it comes with that behaviour already. If not, you can do it yourself in your configuration builder by loading the base file and optionally loading the environment specific oneWas this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.