xml-document-transform

How would I remove Elmah modules from web.config using XML-Document-Transform?

ε祈祈猫儿з 提交于 2019-12-24 10:23:22
问题 In other words, in the following web.config xml, I want to remove all elements with a type attribute that starts with 'Elmah.' <httpModules> <add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" /> <add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" /> <add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" /> </httpModules> I have tried several combinations and structures of the basic transform, with various errors, <add xdt:Locator="XPath([starts-with(@type,'Elmah.')" xdt

Why am I receiving the required attribute 'name' is missing warning in my Web.Release.config XML-Document-Transform file?

三世轮回 提交于 2019-12-12 11:16:10
问题 I'm trying to remove all service endpoint mexHttpBinding nodes in my Web.Release.config file. I found this answer: (I copied from my code file, so it's actually formatted differently than the answer ) <services> <service> <endpoint binding="mexHttpBinding" xdt:Locator="Match(binding)" xdt:Transform="RemoveAll" /> </service> </services> The warning I am receiving is on the <service> node: The required attribute 'name' is missing. Do I need to add an empty string or wildcard ( if there is one )

Web.Config transforms outside of Microsoft MSBuild?

孤街浪徒 提交于 2019-11-27 06:20:37
Is it possible to use Microsoft's XML document transform, for preparing web.configs, outside of MSBuild? I would like to use PowerShell to do these transform without having to run this through the MSBuild engine. If Microsoft had used standard XSLT it would be easy to do in PowerShell. From what I can tell I have to use their C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.Tasks.dll which requires a build engine. Thanks Mike DaCosta I created a small function to handle Microsoft's XML Document Transform in PowerShell. I copied the Microsoft.Web

Web.Config transforms outside of Microsoft MSBuild?

时光怂恿深爱的人放手 提交于 2019-11-26 11:57:32
问题 Is it possible to use Microsoft\'s XML document transform, for preparing web.configs, outside of MSBuild? I would like to use PowerShell to do these transform without having to run this through the MSBuild engine. If Microsoft had used standard XSLT it would be easy to do in PowerShell. From what I can tell I have to use their C:\\Program Files (x86)\\MSBuild\\Microsoft\\VisualStudio\\v10.0\\Web\\Microsoft.Web.Publishing.Tasks.dll which requires a build engine. Thanks 回答1: I created a small