3

I have a configuration file that contains WCF settings:

<host>
    <add baseAddress="net.tcp://myaddress.com:12345/MyService"/>
    <add baseAddress="net.tcp://anotheraddress:67890/MyOtherService"/>
</host>

The 'add' element only has a baseAddress attribute and so I can't use the Match locator. How would one approach transforming multiple elements like in my example?

4

1 回答 1

3

我最终做的是将 xdt:Transform="Replace" 移动到父节点,例如:

<host xdt:Transform="Replace">
    <add baseAddress="net.tcp://myaddress.com:12345/MyService"/>
    <add baseAddress="net.tcp://anotheraddress:67890/MyOtherService"/>
</host>
于 2013-07-31T19:55:15.223 回答