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

[KNOWN ISSUE] The SDK does not correctly locate the Yubico.NativeShims.dll on 32 bit processes #159

Open
DennisDyallo opened this issue Nov 8, 2024 · 0 comments · Fixed by #154
Labels
bug Something isn't working known issue Used to indicate known issues by Yubico NETFramework Issues relating to NET Framework (4.x)

Comments

@DennisDyallo
Copy link
Collaborator

DennisDyallo commented Nov 8, 2024

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.

Related issues: #151, #65.

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

  1. Start new 4.x project
  2. Import Yubikey nuget package
  3. Attempt to locate Yubikeys
  4. Get System.BadImageFormatException

Version

Affects all versions

Version

Affects all versions

@DennisDyallo DennisDyallo added bug Something isn't working known issue Used to indicate known issues by Yubico NETFramework Issues relating to NET Framework (4.x) labels Nov 8, 2024
@DennisDyallo DennisDyallo changed the title [KNOWN ISSUE] [NETFramework4] The SDK does not correctly locate the Yubico.NativeShims.dll on 32 bit processes The SDK does not correctly locate the Yubico.NativeShims.dll on 32 bit processes Nov 8, 2024
@DennisDyallo DennisDyallo pinned this issue Nov 8, 2024
@DennisDyallo DennisDyallo changed the title The SDK does not correctly locate the Yubico.NativeShims.dll on 32 bit processes [KNOWN ISSUE] The SDK does not correctly locate the Yubico.NativeShims.dll on 32 bit processes Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working known issue Used to indicate known issues by Yubico NETFramework Issues relating to NET Framework (4.x)
1 participant