How do you handle multiple web.config files for multiple environments?

后端 未结 9 1150
野趣味
野趣味 2020-12-08 01:04

The way I currently handle this is by having multiple config files such as:

web.config
web.Prod.config
web.QA.config
web.Dev.config

When th

9条回答
  •  温柔的废话
    2020-12-08 01:31

    Scott Gu had an article on this once. The solution he presented was to use a Pre-build event to copy the correct config into place depending on the build configuration chosen.

    I also noticed that there already is a similar question here on SO.

提交回复
热议问题