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

后端 未结 9 1153
野趣味
野趣味 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:28

    I also use the web.DEV.config, web.TEST.config, web.PROD.config etc.

    I find this way the most easiest, simplest and straight-forward way if your projects are not complex. I don't like making things more complicated than neccessary.

    However, I have used NAnt and I think it works well for this. You can set up builds for your different environments. NAnt takes some reading to learn how to use it but it's pretty flexible.

    http://aspnet.4guysfromrolla.com/articles/120104-1.aspx

    http://nant.sourceforge.net/

    I used it along with CruiseControl.net and NUnit to perform automatic daily builds with unit test validation and thought they worked well together.

提交回复
热议问题