I wanted to ask a quick question regarding the behaviour of the MSBuild task XmlMassUpdate.
Has anyone found that the task will only copy unique nodes over to the content XML? For example, if I have a client node which has multiple children called endpoint, then it will only mass copy the first endpoint node while eliminating all the others.
I've provided some examples below of what I'm describing, many thanks in advance.
MSBuild Task:
<Project DefaultTargets="Run" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.targets" />
<Target Name="Run">
<Delete Condition="Exists('web.config')" Files="web.config"/>
<XmlMassUpdate
ContentFile="app.config"
ContentRoot="configuration/system.servicemodel"
SubstitutionsFile="wcf.config"
SubstitutionsRoot="/system.servicemodel"
MergedFile="web.config"
/>
</Target>
</Project>
Content:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.servicemodel/>
</configuration>
Replacement:
<?xml version="1.0" encoding="utf-8" ?>
<system.servicemodel>
<client>
<endpoint binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_LargeMessage"
contract="ClaimsService.IClaimsService"
name="WSHttpBinding_IClaimsService">
</endpoint>
<endpoint binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_LargeMessage"
contract="LateCertificationAdminService.ILateCertificationAdminService"
name="WSHttpBinding_ILateCertificationAdminService">
</endpoint>
</client>
</system.servicemodel>
Output:
<?xml version="1.0" encoding="utf-8" ?>
<system.servicemodel>
<client>
<endpoint binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_LargeMessage"
contract="ClaimsService.IClaimsService"
name="WSHttpBinding_IClaimsService">
</endpoint>
</client>
</system.servicemodel>