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

System.IO.FileLoadException / Exception Unhandled #8

Open
jhungerman opened this issue Nov 27, 2019 · 3 comments
Open

System.IO.FileLoadException / Exception Unhandled #8

jhungerman opened this issue Nov 27, 2019 · 3 comments

Comments

@jhungerman
Copy link

Good morning. I have been struggling with an issue for several weeks. I am going to preface this by saying, I am relatively new to .NET. I am trying to load a YAML config file at form load on a .NET Windows Forms application. I am using CredentialUtil.Load with my file path to the YAML file. I am getting the following exception, and I was hoping you may be able to help guide me through it. I have looked high and low for a good answer, but I haven't found one yet. I installed YamlDotNet through NuGet Package Manager in Visual Studio 2019, and the current version is 8.0.0. I have eBay.Oauth.Client v1.0.1 installed, as well.

image

(Text: System.IO.FileLoadException: 'Could not load file or assembly 'YamlDotNet, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)')

@mattglet
Copy link

@jhungerman First, the way to fix it is to downgrade YamlDotNet to version 5 via nuget package manager.

Second, I believe (someone correct me if I'm wrong) the problem is that this ebay library has a direct dependency on YamlDotNot v5 and if you try to use a higher version it will throw the error. My knowledge about version dependencies pretty much ends there - at the obvious - but I'd love to hear from someone who knows more.

@jhungerman
Copy link
Author

Thank you for your response! I tried rolling back to 5.0.0, but that threw an error that the eBay client isn't compatible, that it had to be >5.3.0. I installed 5.3.0, and that seemed to work. Version 5 is obviously 3 versions behind, though, so I'm not sure if something is in the works to make the eBay client compatible with newer versions.

@mattglet
Copy link

Sorry, I was going off of memory when mentioning v5.0. Glad 5.3 worked for you though.

As far as newer versions, there's the old saying of "if it ain't broke, don't fix it". v5.3 has the features needed to run with the ebay client... the library doesn't need to care about v6, v7, v8, etc. and any issues that might pop up in those new versions.

It's the same reason most major banking systems still rely on Fortran and COBOL, and not C#. Their systems work, and the cost of upgrading outweighs everything else.

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

2 participants