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

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

    The way we've been doing it is to override the AppSettings section:

    
            
        ...
    
    

    This only works for the appSettings section and so is only useful to a degree. I'd be very interested in more robust solutions.

    Edit Below

    Just watched this: http://channel9.msdn.com/shows/10-4/10-4-Episode-10-Making-Web-Deployment-Easier/

    VS2010 has config transforms which look pretty awesome, should make multiple configurations a complete breeze.

提交回复
热议问题