是否可以使用Microsoft的XML文档转换,在MSBuild之外准备web.configs?我想使用PowerShell进行这些转换,而无需通过MSBuild引擎运行它.如果Microsoft使用标准XSLT,那么在PowerShell中很容易做到.据我所知,我必须使用他们需要构建引擎的C:\ Program Files(x86)\ MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.Tasks.dll.谢谢
我正在尝试删除Web.Release.config文件中的所有服务端点mexHttpBinding节点.我找到了这个答案 :(
我从我的代码文件中复制了,所以它实际上的格式与答案不同)
<services>
<service>
<endpoint binding="mexHttpBinding"
xdt:Locator="Match(binding)"
xdt:Transform="RemoveAll" />
</service>
</services>
Run Code Online (Sandbox Code Playgroud)
我收到
的警告是在<service>节点上:
缺少必需的属性"名称".
我是否需要在节点的属性中添加空字符串或通配符(如果有)以解决此警告?
此外,上述转换不应该包含在节点中,还是不包含?name<service><system.serviceModel>
asp.net web-config-transform xml-document-transform web-release-config web-debug-config