将dependentAssembly标记添加到没有xmlns by manifest的web配置

时间:2017-01-04 15:33:39

标签: xml web-config dotnetnuke manifest

我有一个 DotNetNuke 清单,可以将dependentAssembly标记添加到网络配置中,如下所示:

<component type="Config">
  <config>
    <configFile>web.config</configFile>
    <install>
      <configuration>
        <nodes>

          <node path="/configuration/runtime/ab:assemblyBinding" action="update"
            targetpath="/configuration/runtime/ab:assemblyBinding[ab:dependentAssembly/ab:assemblyIdentity/@name='EntityFramework']"
            collision="ignore" nameSpace="urn:schemas-microsoft-com:asm.v1" nameSpacePrefix="ab">

            <dependentAssembly>
              <assemblyIdentity name="EntityFramework" publicKeyToken="b77a5c561934e089" culture="neutral" />
              <codeBase version="6.0.0.0" href="bin/EntityFramework-6.1.3/EntityFramework.dll" />
            </dependentAssembly>

          </node>              

        </nodes>
      </configuration>
    </install>
    <uninstall>
      <configuration>
        <nodes>
          <!--Remove EF -->
        </nodes>
      </configuration>
    </uninstall>
  </config>
</component>

执行此清单后,dependentAssembly的{​​{1}}节点将添加到网络配置中,如下所示:

EntityFramework

此节点具有<dependentAssembly xmlns=""> <assemblyIdentity name="EntityFramework" publicKeyToken="b77a5c561934e089" culture="neutral" /> <codeBase version="6.0.0.0" href="bin/EntityFramework-6.1.3/EntityFramework.dll" /> </dependentAssembly> 属性,但我想在没有xmlns=""的情况下添加此节点。我的代码是错的吗?

0 个答案:

没有答案