Nick Macroy
Nick Macroy

Reputation: 46

Method not found: RestSharp.IRestReuqest RestSharp.RestRequest.AddFile

Use the Docusign API to send a Document for a signature

 string accountId = loginApi(username, password, integratorKey); 

Which then calls LoginAPI method which breaks at line:

        LoginInformation loginInfo = authApi.Login();

Which should allow me to receive the accountId for my integrator key/login credentials

Instead I am getting an error of:

{"Method not found: 'RestSharp.IRestRequest RestSharp.RestRequest.AddFile(System.String, System.Action`1, System.String, System.String)'."}

Just started integrating Docusign into our application so using these versions which are dependencies to attempt to recreate this issue:

Docusign.eSign.dll V2.1.8

RestSharpv106.1.0

RestSharpSignedv105.2.3

Newtonsoft.Json v10.0.3

BouncyCastle v1.8.1

Any Idea?

Upvotes: 2

Views: 7846

Answers (3)

sman
sman

Reputation: 9

I encountered a similar problem while using the eBay "OAuth client library." The issue manifested as the following exception:

Message=Method not found: 'RestSharp.RestResponse RestSharp.RestClientExtensions.Execute(RestSharp.RestClient, RestSharp.RestRequest, System.Threading.CancellationToken)'. Source=ebay-oauth-csharp-client

Upon investigation, I determined that the root cause of the issue was a mismatch between the RestSharp version in my main project and the version being utilized in the OAuth client library.

Upvotes: 0

Crisp Frost
Crisp Frost

Reputation: 41

This is because of RestSharp and RestSharpSigned have the same dll file name and one overwrites the other.

You should use RestSharpSigned only to avoid conflict.

I solved the issue by uninstalling RestSharp and its binding redirect in *.config file:

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

Upvotes: 4

GreatSamps
GreatSamps

Reputation: 619

Know this is a bit of an old one, but I had the same problem. As Nick suspected, the issue was down to a conflict between RestSharpSigned and RestSharp.

I uninstalled both and the DocuSign library, then re-installed RestSharpSigned, then DocuSign. Our other code that was using the standard RestSharp library seems to be working fine with the signed version.

Upvotes: 1

Related Questions