-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Method not found: 'RestSharp.RestRequest RestSharp.RestRequestExtensions.AddFile(RestSharp.RestRequest, System.String, Byte[], System.String, System.String)'. #484
Comments
PETOSS-336 |
Thanks for raising an issue, a ticket has been created to track your request |
An update. We are making api call GetContactByContactNumberAsync. When we use RestSharp 108.0.1.0 we get error “Could not load file or assembly 'RestSharp, Version=110.1.0.0, Culture=neutral, PublicKeyToken=598062e77f915f75' or one of its dependencies. The system cannot find the file specified.” When we use RestSharp 110.1.0.0 we get error “Method not found: 'RestSharp.RestRequest RestSharp.RestRequestExtensions.AddFile(RestSharp.RestRequest, System.String, Byte[], System.String, System.String)'”. Can you recommend a RestSharp version for Xero? |
I've encountered the same problem today while upgrade RestSharp to the latest version in our project. I've taken a fork of the Xero-NetStandard code and updated it to the latest RestSharp (and Newtonsoft.Json) versions and I will be testing it and pushing it to our production environment all being well. There's already a PR from @AshleyMedway (#478) that resolves this issue as far as I can tell. |
Encountered this problem today. Is there a way to resolve this? |
There's only a work around at the moment, which is to download the repo, update the nuget package references for RestSharp yourself, and then compile into either a local nuget package, or just the dlls and use those instead of the live Xero Nuget pacakages. |
Please fix this :) |
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: Thanks. |
I got the same problem too. Please fix it. |
Downgraded the RestSharp to 106.15.0 seems solved the problem |
But what should we do if other libs depend on the new RestSharp, i means if we are forced to update the Restsharp to the lasts one ? |
Yeah.. nah. I presume they're using swaggergen which has old dependencies.. |
Your only option is to fork the library, update the RestSharp dependancies and compile the binary. I created a fork myself and did this myself and it's been working well for me while waiting for Xero to update https://github.com/amyskippy/Xero-NetStandard I'm a little disappointed that it's been over 3 months and it's still an outstanding issue. I'm going to the Xero convention next year, so I might try and raise this with someone as it's not really acceptable |
I have the same problem. Can't believe Xero havn't sorted this yet. |
[sad] Ali Ashraf reacted to your message:
…________________________________
From: Anton Zherdev ***@***.***>
Sent: Wednesday, January 3, 2024 11:18:08 PM
To: XeroAPI/Xero-NetStandard ***@***.***>
Cc: Ali Ashraf ***@***.***>; Comment ***@***.***>
Subject: Re: [XeroAPI/Xero-NetStandard] Method not found: 'RestSharp.RestRequest RestSharp.RestRequestExtensions.AddFile(RestSharp.RestRequest, System.String, Byte[], System.String, System.String)'. (Issue #484)
Closed #484<#484> as completed.
—
Reply to this email directly, view it on GitHub<#484 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BCXKV5ZYAXCSACG63DN5IZLYMXRLBAVCNFSM6AAAAAA3RHMMV6VHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJRGM4DGOJVG4YDKMY>.
You are receiving this because you commented.Message ID: ***@***.***>
|
The issue has been resolved in the latest version of the library. |
SDK you're using (please complete the following information):
Describe the bug
When calling code;
result = Await apiInstance.GetInvoicesAsync(xeroToken.AccessToken, xeroTenantId,, where)
getting error 'Method not found: 'RestSharp.RestRequest RestSharp.RestRequestExtensions.AddFile(RestSharp.RestRequest, System.String, Byte[], System.String, System.String)'.'.
To Reproduce
Use this code to get the error;
result = Await apiInstance.GetInvoicesAsync(xeroToken.AccessToken, xeroTenantId,, where)
Expected behavior
No error.
Additional context
This started happening recently on code running fine for months.
The text was updated successfully, but these errors were encountered: