3

I have a web application that is deployed with web.config file. Are there any tools/ pre-written deployment code that allows merging 2 web.config files including sections? If there is a section already existing, it should just merge the contents

Thanks in advance. Any guidance is much appreciated

bryanmac
  • 38,266
  • 10
  • 89
  • 97
G33kKahuna
  • 1,670
  • 7
  • 23
  • 39

3 Answers3

5

Have a look at XmlConfigMerge

The XmlConfigMerge utility (provided both as a library assembly and as a console application) supports this merging of XML .config files, and also supports setting of specific parameters via XPath filtering and optional Regex pattern matching.

bryanmac
  • 38,266
  • 10
  • 89
  • 97
1

You can use any merge tool. Here's one example - SourceGear Merge

http://www.sourcegear.com/diffmerge/

Jakub Konecki
  • 44,908
  • 7
  • 86
  • 126
1

Take a look at transformations:

Managing web.config files

Similar questions here:

Managing web.config files

Using different Web.config in development and production environment

Community
  • 1
  • 1
IrishChieftain
  • 15,099
  • 7
  • 48
  • 91
  • Not between environments. GP release to multiple deployments and upgrade their config with appends etc. Checkout Byranmac's solution – G33kKahuna Apr 26 '12 at 04:52