MSBuild XmlMassUpdate Task

こ雲淡風輕ζ 提交于 2019-12-01 18:25:22

The XmlMassUpdate help section included in the MSBuildCommunityTasks help file shows examples of dealing with multiple elements that have the same name.

You need to differentiate the elements using a unique attribute, this attribute will be defined as an XmlMassUpdate "key". In your case, the name attribute will work. I believe this updated Replacement code below will fix your issue, notice the xmu attributes.

<?xml version="1.0" encoding="utf-8" ?>
<system.servicemodel>
    <client xmlns:xmu="urn:msbuildcommunitytasks-xmlmassupdate">
        <endpoint   xmu:key="name" 
                    binding="wsHttpBinding" 
                    bindingConfiguration="WSHttpBinding_LargeMessage"
                    contract="ClaimsService.IClaimsService"
                    name="WSHttpBinding_IClaimsService">
        </endpoint>
        <endpoint   xmu:key="name"
                    binding="wsHttpBinding" 
                    bindingConfiguration="WSHttpBinding_LargeMessage"
                    contract="LateCertificationAdminService.ILateCertificationAdminService"
                    name="WSHttpBinding_ILateCertificationAdminService">
        </endpoint>
    </client>
</system.servicemodel>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!