【发布时间】:2016-06-15 22:42:43
【问题描述】:
我遇到的情况是,Docusign API 使用 598062e77f915f75 的公钥令牌引用 RestSharp 签名程序集。在同一个项目中,我使用了 Twilio API,它还引用了未签名的 Restsharp 程序集,显然带有一个空公钥令牌。
我可以做一个或另一个工作,但不能同时工作,因为我不能同时添加已签名和未签名的 RestSharp 引用,因为它们都具有相同的名称。
当我引用已签名的程序集时,Docusign 部分工作,但 Twilio 代码错误:
Could not load file or assembly 'RestSharp, Version=105.2.3.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
当我引用未签名的程序集时,Docusign 错误如下:
Could not load file or assembly 'RestSharp, Version=100.0.0.0, Culture=neutral, PublicKeyToken=598062e77f915f75' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
有没有办法解决这个问题?
我已经尝试过在我能想到的每一种组合中绑定重定向:
<dependentAssembly>
<assemblyIdentity name="RestSharp" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-100.0.0.0" newVersion="105.2.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="RestSharp" publicKeyToken="598062e77f915f75" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-100.0.0.0" newVersion="105.2.3.0" />
</dependentAssembly>
【问题讨论】:
-
你试过使用 bindingRedirect 吗?
-
我有两个方向。添加到原始问题。
-
使用不同的 publicKeyToken 的 assemblyRedirect 配置有点复杂。尝试使用这个问题的答案stackoverflow.com/questions/3158928/…
-
向 twilio 投诉...
标签: c# twilio .net-assembly docusignapi