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,941
  • 11
  • 91
  • 99
G33kKahuna
  • 1,730
  • 7
  • 24
  • 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,941
  • 11
  • 91
  • 99
1

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

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

Jakub Konecki
  • 45,581
  • 7
  • 87
  • 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,108
  • 7
  • 50
  • 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