XeroAPI / Xero-NetStandard

A wrapper of the Xero API in the .NetStandard 2.0 framework. Supports Accounting, Payroll AU/US, and Files
MIT License
118 stars 119 forks source link

While Search Sale Invoice Error: Method not found: 'RestSharp.RestRequest RestSharp.RestRequestExtensions.AddFile(RestSharp.RestRequest, System.String, Byte[], System.String, System.String #495

Closed developervisualapprovals closed 6 months ago

developervisualapprovals commented 6 months ago

SDK you're using (please complete the following information):

Describe the bug A clear and concise description of what the bug is. This is critical. I am currently utilizing the BoldSign SDK, Google, and other 3rd-party SDKs in my Windows Form application. All these SDKs require the latest RestSharp (version 110.2.0.0). However, the Xero SDK is not compatible with this version, resulting in issues with SearchInvoice APIs and other accounting APIs. The error message returned is: (Method not found: 'RestSharp.RestRequest RestSharp.RestRequestExtensions.AddFile(RestSharp.RestRequest, System.String, Byte[], System.String, System.String)) I understand the reasons behind this issue and can provide further details if needed. Kindly update the Xero SDK to ensure compatibility with the latest RestSharp.

Thanks. To Reproduce Steps to reproduce the behavior:

  1. Go to '...' install the Latest Rest Sharp Version and try to search the Sales invoices.
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen. Please upgrade the RestSharp package in Xero SDK and provide new Nuget Package. Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

github-actions[bot] commented 6 months ago

PETOSS-374

github-actions[bot] commented 6 months ago

Thanks for raising an issue, a ticket has been created to track your request

slykiwi commented 6 months ago

Is there a fix for this yet?

Tankzor commented 6 months ago

This is unlikely to get fixed any time soon - they seem to be ignoring it - even though there is an outstanding PR that fixes it (see issue #484). Some more duplicate issues: #442 #472

MrOnosa commented 6 months ago

I encountered this problem after upgrading to .NET Framework 4.8. I have worked around this issue by doing the following:

  1. Using NuGet - Solution, I changed all of my projects that were referencing RestSharp 110.2.0.0 and downgraded them to 108.0.1
  2. I edited the app.config file for each project, and removed the bindingRedirect. If you require a bindingRedirect, try changing it to this:
    <dependentAssembly>
    <assemblyIdentity name="RestSharp" publicKeyToken="598062e77f915f75" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-110.2.0.0" newVersion="108.0.1" />
    </dependentAssembly>