合并2配置文件配置文件

2023-09-03 04:16:21 作者:花开终落,

我有一个部署web.config文件的Web应用程序。是否有任何工具/ pre-书面部署​​code,允许合并2的web.config文件,包括部分?如果有一个部分已经存在,就应该只合并的内容

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

在此先感谢。任何指导是多少AP preciated

Thanks in advance. Any guidance is much appreciated

推荐答案

看一看的 XmlConfigMerge

在XmlConfigMerge实用程序(提供既作为一个库程序集和作为   控制台应用程序)支持该合并的XML .config文件,并   也支持通过XPath过滤及具体参数的设置   可选的正则表达式模式匹配。

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.