解决方法
web.config转换不关心自定义配置部分.它将在整个web.config文件中进行替换.
这是一个web.config替换的示例XML我用来设置我们的memcached服务器ips:
<?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>