Does anybody know how to get the web.config transformation to replace a custom configuration section. I have set msbuild to verbose mode and the transformation simply ignores the existence of the custom section with a replace transform.
有人知道怎么上网吗?配置转换以替换自定义配置部分。我将msbuild设置为详细模式,而转换只是忽略了带有替换转换的自定义部分的存在。
2 个解决方案
#1
14
A web.config transformation does not care about custom configuration sections. It will do replacements on the whole web.config file.
一个网络。配置转换不关心自定义配置部分。它将在整个网络上进行替换。配置文件。
Here is an example XML of a web.config replacement I used to set our memcached server ips:
这里有一个web的XML示例。配置替换我用来设置memcached服务器ip:
<?xml version="1.0"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<enyim.com>
<memcached>
<servers xdt:Transform="Replace">
<add address="192.168.130.1" port="11211" />
<add address="192.168.130.2" port="11211" />
<add address="192.168.130.3" port="11211" />
</servers>
</memcached>
</enyim.com>
</configuration>
#2
#1
14
A web.config transformation does not care about custom configuration sections. It will do replacements on the whole web.config file.
一个网络。配置转换不关心自定义配置部分。它将在整个网络上进行替换。配置文件。
Here is an example XML of a web.config replacement I used to set our memcached server ips:
这里有一个web的XML示例。配置替换我用来设置memcached服务器ip:
<?xml version="1.0"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<enyim.com>
<memcached>
<servers xdt:Transform="Replace">
<add address="192.168.130.1" port="11211" />
<add address="192.168.130.2" port="11211" />
<add address="192.168.130.3" port="11211" />
</servers>
</memcached>
</enyim.com>
</configuration>