问题描述
我试图用4.0.0.0使用2.5.0.0
I am trying to downgrade a NServiceBus dependency so instead of using 4.0.0.0 to use 2.5.0.0
我用下面的方式努力着,似乎没有这些。工作
I am trying with the following ways, none of which seem to work.
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="NServiceBus"
publicKeyToken="9fc386479f8a226c" culture="neutral"/>
<bindingRedirect oldVersion="4.0.0.0" newVersion="2.5.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
我也试图与基本代码:
I also tried with codebase :
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="NServiceBus"
publicKeyToken="9fc386479f8a226c"
culture="neutral"/>
<codeBase version="2.5.0.0" href="NServiceBus.dll"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
不过,虚无缥缈。我通过MSDN文档去了,也没有在向后的方式使用这种能力的提。这可能吗?
Still, nada. I went through the msdn documentation and there is no mention of using this capability in a backwards way. Is this possible?
推荐答案
我实际使用您的第一条语句对于一些互操作的DLL,因为我们公司的客户有不同的有关Office更新的状态。这是我使用的代码:
I'm actually using your first statement for some interop DLLs because the clients in our company have a different state regarding office updates. This is the code I use :
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="office" publicKeyToken="71E9BCE111E9429C" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-14.0.0.0" newVersion="11.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
这提供了向后的版本兼容性该DLL到版本11的14你能提供给DLL链接ü使用?
This provides backwards compatibility from version 14 of the DLL to version 11. Could you provide a link to the DLL u are using?
我已经下载了NServiceBus框架(版本3.3.8),并调查该DLL与ILSpy。我建议你做同样的你的DLL。对于我的DLL它表明我同样的公钥标记为你的。你确定,你使用版本4.0.0.0,而不是verision 3.3.0.0。或者你missmatched公钥令牌也许吧。
I've downloaded the NServiceBus framework (version 3.3.8) and investigated the DLL with ILSpy. I would suggest you do the same with your DLL. For my DLL it shows me the same public Key token as yours. Are you sure, that you use version 4.0.0.0 and not verision 3.3.0.0. Or you missmatched the public Key tokens perhaps.
这篇关于大会绑定重定向到一个较低的版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!