Strong named assembly along with unsigned assembly

I have a situation where the Docusign API refers to a signed RestSharp assembly with the public key token 598062e77f915f75. In the same project, I use the Twilio API, which also refers to an unsigned Restsharp assembly, obviously with a public key token of zero.

I can do one or the other work, but not at the same time, since I cannot add both signed and unsigned RestSharp links, as they both have the same name.

When I have a link to a signed assembly, the Docusign part works, but Twilio code errors with this:

Could not load file or assembly 'RestSharp, Version=105.2.3.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

When I reference an unsigned assembly, Docusign with this:

Could not load file or assembly 'RestSharp, Version=100.0.0.0, Culture=neutral, PublicKeyToken=598062e77f915f75' or one of its dependencies. The located assembly manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Is there any way around this?

I tried to link the forwarding in every combination that I can think of:

  <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>
+4
3

:

  • . , , . . SO: 2 log4net
  • GAC. , .
  • AppDomain.AssemblyResolve (. , )
  • /unsigning ildasm.

log4net, . .

0

. Nuget RestSharpSigned. .

0

:

  <dependentAssembly>
    <assemblyIdentity name="RestSharp" publicKeyToken="598062e77f915f75" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-105.2.3.0" newVersion="105.2.3.0" />
  </dependentAssembly>
-1

All Articles