Closed
Description
On .NET Framework The SDK does not correctly locate the Yubico.NativeShims.dll on 32 bit processes.
When loading the SDK and trying to enumerate devices using the FindAll or FindByTransport methods. You will get a System.BadImageFormatException HResult=0x8007000B Message=An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B) Source=Yubico.Core
NETFramework apps are 32bit processes by default. The workaround is to set your project to be 64 bit by using <Prefer32Bit>false</Prefer32Bit>
in your csproj.
The fix will be published with the next release in December Q4, 2024.
Here's the fix #154
This only affects NET Framework and not NET6 and upwards.
Steps To Reproduce
- Start new 4.x project
- Import Yubikey nuget package
- Attempt to locate Yubikeys
- Get
System.BadImageFormatException
Version
Affects all versions
Version
Affects all versions