私はこことGoogle(など)の同様の投稿について通常のチェックを行いましたが、役に立たないです。Web.Config変換XPath
基本的に私は、Web.Config変換を使用しているVisual Studio 2010 MVC3ソリューションを持っており、大部分は作業しています。しかし、私はいくつかの単体テストのバインディングを削除したいと思うし、XMLの場所のためにややこしいです。
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="EntityFramework" publicKeyToken="b77a5c561934e089" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.VisualStudio.QualityTools.HostAdapters.ASPNETAdapter" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<codeBase version="10.0.0.0" href="file:///C:/Program%20Files/Microsoft%20Visual%20Studio%2010.0/Common7/IDE/PrivateAssemblies/Microsoft.VisualStudio.QualityTools.HostAdapters.ASPNETAdapter.DLL" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.VisualStudio.QualityTools.Common" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<codeBase version="10.0.0.0" href="file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.QualityTools.Common/10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.QualityTools.Common.dll" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.VisualStudio.QualityTools.ExecutionCommon" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<codeBase version="10.0.0.0" href="file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.QualityTools.ExecutionCommon/10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.QualityTools.ExecutionCommon.dll" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.VisualStudio.QualityTools.Resource" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<codeBase version="10.0.0.0" href="file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.QualityTools.Resource/10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.QualityTools.Resource.dll" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="AjaxMin" publicKeyToken="21ef50ce11b5d80f" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.46.4422.26284" newVersion="4.46.4422.26284" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Esentiallyが、私は「Microsoft.VisualStudio」を含む名前の子ノードを含むノードを削除する:ここで
を削減バージョンです。<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.VisualStudio.QualityTools.HostAdapters.ASPNETAdapter" xdt:Transform="Remove" xdt:Locator="Match(name)" />
<assemblyIdentity name="Microsoft.VisualStudio.QualityTools.Common" xdt:Transform="Remove" xdt:Locator="Match(name)" />
<assemblyIdentity name="Microsoft.VisualStudio.QualityTools.ExecutionCommon" xdt:Transform="Remove" xdt:Locator="Match(name)" />
<assemblyIdentity name="Microsoft.VisualStudio.QualityTools.Resource" xdt:Transform="Remove" xdt:Locator="Match(name)" />
<codeBase version="10.0.0.0" xdt:Transform="RemoveAll" xdt:Locator="Match(version)" />
</dependentAssembly>
<dependentAssembly xdt:Locator="XPath(//runtime/*/*[not(node())])" xdt:Transform="RemoveAll" />
</assemblyBinding>
</runtime>
</configuration>
作品のこの種のが、私が望んでいない空のノードを与える:
これまでのところ、私は変態のWeb.Configで、いくつかの冗長な構文を使用して空にしたノードを取得することができます。
アイデア?
乾杯!
この質問はまだありませんか? – Jimmy