I have a situation where I have a different web.config configuration for each branch and I need to merge constantly from branch A to Branch B, however every time I do so, I get the file to be overwritten. I was thinking of having variations of this file for each branch, something like:
dev-Web.config prod-Web.config
Is this possible? Which approach would you take?
Here is what we do: Not using web.config for settings that change between environments.
We have separate config files for this, and the application at runtime decides which one to use depending on a settings file (or a registry key - VERY handy for debugging as you just click a .reg file and be done).
Deployment scripts will choose which setting to write out dpending on the environmen name (ie use the name of the environment to copy a file with a similar name).
But web.config never changes between 30 or so environments.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.