Docusign "Could Not load file or Assembly Restsharp" Error

0

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! :)

c#
.net-core
docusignapi

2 Answers

2

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

answered on Stack Overflow Jun 10, 2020 by Inbar Gazit
1

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.

answered on Stack Overflow Jun 3, 2020 by Inbar Gazit

User contributions licensed under CC BY-SA 3.0