Skip to content
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

Errror FileLoadException RestSharp #20

Open
ulric03 opened this issue Apr 23, 2021 · 3 comments
Open

Errror FileLoadException RestSharp #20

ulric03 opened this issue Apr 23, 2021 · 3 comments

Comments

@ulric03
Copy link

ulric03 commented Apr 23, 2021

I am load GetApplicationToken
CredentialUtil.Load(path);
IList<string> list = new List<string>() { "https://api.ebay.com/oauth/api_scope" };
OAuthResponse oAuthResponse = new OAuth2Api().GetApplicationToken(eBay.ApiClient.Auth.OAuth2.Model.OAuthEnvironment.SANDBOX, list);
but a get next error
System.IO.FileLoadException: 'Could not load file or assembly 'RestSharp, Version=106.5.4.0, Culture=neutral, PublicKeyToken=598062e77f915f75'. Could not find or load a specific file. (0x80131621)'
in my csproj i add <PackageReference Include="RestSharp" Version="106.5.4" />

Has anyone ever experienced this? can you help me

@ChiaraMariee
Copy link

I've got the same issue were qou able to resolve it?

@bounav
Copy link

bounav commented Jun 22, 2023

Some older version of nuget packages don't have a publicKeyToken value, if you happen to also depend on a more recent version of the nuget package that does set that value, then you're going to have these FileLoadException because in your build output msbuild will include the more recent version of the .dll and the publicKeyToken value won't match.

FYI: You can see what the publicKeyToken for given .dll is with this powershell command:

[Reflection.AssemblyName]::GetAssemblyName('C:\path\to\YourDependency.dll').FullName

This issue should be addressed by the pull request I submitted with along issue #27.

@bounav
Copy link

bounav commented Aug 16, 2023

This shouldn't be an issue since PR #30.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants