【问题标题】:How to redirect an assembly binding from a wild carded version to a wild carded version?如何将程序集绑定从通配符版本重定向到通配符版本?
【发布时间】:2011-05-25 14:28:41
【问题描述】:

我知道我们可以做到这一点

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
   <dependentAssembly>
      <assemblyIdentity name="MyAssembly1" publicKeyToken="3484e1fc2d0c223b" culture="neutral"/>
      <bindingRedirect oldVersion="0.0.0.0-99.99.99.99" newVersion="6.0.3.2"/>
   </dependentAssembly>
</assemblyBinding>

但我似乎无法做到这一点

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
       <dependentAssembly>
          <assemblyIdentity name="MyAssembly1" publicKeyToken="3484e1fc2d0c223b" culture="neutral"/>
          <bindingRedirect oldVersion="0.0.0.0-99.99.99.99" newVersion="6.0.3.0-999"/>
       </dependentAssembly>
    </assemblyBinding>

谢谢

【问题讨论】:

  • 我不认为这是受支持的,根据最新的 .NET 4 文档:msdn.microsoft.com/en-us/library/eftw1fys.aspx
  • 这不被支持 - 你为什么要这样做(即你希望这里有什么行为)? newVersion 需要是显式版本,向运行时说明需要加载哪些 DLL,如果您有 6.0.3.0 和 6.0.4.0,运行时应该做什么?
  • @Adam 您应该将您的评论升级为答案。

标签: .net assemblies versioning redirect


【解决方案1】:

这不被支持 - 你为什么要这样做(即你希望这里有什么行为)? newVersion 需要是显式版本,向运行时说明需要加载什么 DLL,如果您有 6.0.3.0 和 6.0.4.0,运行时应该做什么?

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-11-05
    • 2019-12-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-06-28
    相关资源
    最近更新 更多