I have a web service that needs different settings for different environments (debug, test, prod). What’s the easiest way to setup separate config files for these different environments? Everything I find on the web tells me how to use configuration manager to retrieve settings, but not how to find particular settings based on the current build configuration.
I have a web service that needs different settings for different environments (debug, test,
Share
I find having several config files for each environment works well. ie:
I then link to a ‘master’ version of this using the built in configSource attribute within the web.config or app.config such as
I would then use the build process or deploy process to copy the the correct configuration for the environment down to the name that the web.config is expecting.
Each environment is clearly labelled and controlled, without the need of messy placeholders.