我有一个包含WCF设置的配置文件:
<host>
<add baseAddress="net.tcp://myaddress.com:12345/MyService"/>
<add baseAddress="net.tcp://anotheraddress:67890/MyOtherService"/>
</host>
&#39;添加&#39; element只有baseAddress属性,所以我不能使用Match定位器。如何在我的例子中改变多个元素?
答案 0 :(得分:3)
我最终做的是将xdt:Transform =“Replace”移动到父节点,如:
<host xdt:Transform="Replace">
<add baseAddress="net.tcp://myaddress.com:12345/MyService"/>
<add baseAddress="net.tcp://anotheraddress:67890/MyOtherService"/>
</host>