3
웹 구성에 다음 XML이 포함되어 있고 릴리스 모드에서 자식의 이름 특성 인 assemblyIdentity에 따라 dependentAssembly 섹션을 제거해야합니다. 나는 대답을 여기에서 시도했다 : xdt transform locator that matches subnode content 그러나 운 없음. 내 Web.config의이 같은 것입니다 : 나는 자식 요소하지만 성공에 따라 삭제에 대한 두 번째 dependentAssembly 요소를 선택 내 web.release.config에 다음과 같은 시도릴리스 용 웹 구성 변환
<?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" newVersion="2.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.VisualStudio.QualityTools.Resource" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<codeBase version="10.0.0.0" href="file:///c:/Program%20Files%20(x86)/Microsoft%20Visual%20Studio%2010.0/Common7/IDE/PrivateAssemblies/Microsoft.VisualStudio.QualityTools.HostAdapters.ASPNETAdapter.DLL" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
.
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" >
<dependentAssembly>
<!-- Attempt 1 -->
<assemblyIdentity xdt:Transform="RemoveAll"
xdt:Locator="Condition(@name='Microsoft.VisualStudio.QualityTools.Resource')"/>
</dependentAssembly>
</assemblyBinding>
<!-- Attempt 2 -->
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly xdt:Transform="Remove"
xdt:Locator="Condition(assemblyIdentity/@name='Microsoft.VisualStudio.QualityTools.Resource')">
</dependentAssembly>
</assemblyBinding>
</runtime>
https://webconfigtransformationtester.apphb.com/은 변환을 가져 오는 데 유용합니다. 또한 dependentAssembly 이름이 제공된 config와 일치하지 않으며 locator에있는 이름이 일치하지 않습니다. – BenM
어셈블리 이름에 대한 저의 실수였습니다. 나는 포스트를 편집했습니다. 고맙습니다. 귀하가 제공 한 sitee는 도움이되지만 여전히 파악할 수 없습니다. –