-
Notifications
You must be signed in to change notification settings - Fork 51
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
BadImageFormatException when using FindAll or FindByTransport #65
Comments
To provide some clarity and to assist in possible debugging steps. I am using the Nuget package version 1.9.1 |
Hi, can you please provider the .NET version, Operating System, and Processor Architecture you're encountering this error with? The exception is usually seen when there's a runtime mismatch between our native platform library Yubico.NativeShims.dll and the managed process's runtime identifier. (i.e. 32-bit DLL loading into 64-bit process or vice versa). This should be automatically handled by NuGet and MSBuild, but it doesn't always get it correct. |
I am using .NET framework version 4.8, Windows 11 pro and running Zen 3 64 bit architecture. |
I have managed to find out the error, by default visual studio and windows forms has an option called prefer 32 bit. When you mentioned about 32 bit trying to load into 64 bit and vice versa I deselected the option and It has fixed the error. May I suggest that you or someone in charge of the sdk docs put a note on there that highlights this problem |
These should be fixed now @Multi-Coder-24 , please get back to me if you run into any issues |
Every time I attempt to call either FindAll or FindByTransport I get the following exception,
System.BadImageFormatException
HResult=0x8007000B
Message=An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
Source=Yubico.Core
Stacktrace: https://gist.github.com/DDX5/71488b1f4e4f0a49d1b5c8bd13a6b9d3
The text was updated successfully, but these errors were encountered: