Suemayah Eldursi
Suemayah Eldursi

Reputation: 355

Docusign "Could Not load file or Assembly Restsharp" Error

I'm using Docusign in my (.netcore 3.1) project and I'm also using another nuget package which relies on minio. Both seem to rely on Restsharp.

When I try to run my app I'm getting this error:

System.IO.FileLoadException: 'Could not load file or assembly 'RestSharp, Version=106.3.1.0, Culture=neutral, PublicKeyToken=598062e77f915f75'. The located assembly's manifest definition does not match the assembly reference. (0x80131040)'

Docusign Version: 4.4.1

This is a screenshot of the dependencies as viewed from visual studio: image

image

I've tried adding this binding redirect in App.Config:

<configuration>
  <runtime>
    <dependentAssembly>
      <assemblyIdentity name="RestSharp" publicKeyToken="598062e77f915f75" culture="neutral" />
      <bindingRedirect oldVersion="0.0.0.0-106.3.1.0" newVersion="106.10.1" />
    </dependentAssembly>
  </runtime>
</configuration>

This has had no impact whatsoever. Please can you help me. Any help very much appreciated! :)

Upvotes: 0

Views: 597

Answers (2)

Inbar Gazit
Inbar Gazit

Reputation: 14050

Another version of the nuget fixes this problem. Please check latest version 4.4.1 has the fix.

Upvotes: 1

Inbar Gazit
Inbar Gazit

Reputation: 14050

The 4.4.1 version of the C# SDK depends on the specific version of RestSharp.dll, it must use version 106.3.1.0. A later version would not work. This is a known issue and would probably only get fixed in version 4.5.0, and I don't know when that version would be released at this time. The only workaround is to find restsharp.dll version 106.3.1.0 and add it as a reference or put it in the same folder so that it can be loaded (was going to say put it in the GAC but you're using .NET Core).

Revision: actually, if you want to build your own version of DocuSign.eSign.dll, you can go to https://github.com/docusign/docusign-csharp-client and build the code yourself.

Upvotes: 1

Related Questions