-
Notifications
You must be signed in to change notification settings - Fork 55
[KNOWN ISSUE] The SDK does not correctly locate the Yubico.NativeShims.dll on 32 bit processes #159
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
Comments
There is still an issue with this, the files should be copied to x86 or x64 in any case not only in the case of AnyCPU as NativeMethods loads it from there:
The ARM case is not used anymore |
Hi @romerod These two branches are copying the binaries to either /x86 or /x64 based on Platform or OS Architecture. Or am I missing something? Is is your problem the OR-clause, that it includes OSArchitecture as well?
|
And regarding the ARM-case, I wasn't a part of setting up this targets-file, so my knowledge and experience is limited. But what do you mean it's not used any more? @romerod |
I understood what the branches do, but the original targets file doesn't copy it to x86 (or x64), the xml I've added in the comment was already fixed. Here it's still copied to the root, I think these should be changed. About the arm branch: From what I see in Yubico.NET.SDK/Yubico.NativeShims/Yubico.NativeShims.nuspec Lines 35 to 36 in 443e7c7
the targets file is only used for net47. And
From my point of view the code should be:
And the targets file should be:
|
Aha, now I understand. And the ARM-issue, I haven't taken a lookt at it properly. But what you suggest makes sense to me. @romerod |
@DennisDyallo will this be implemented? |
Our next planned release is Mid April @romerod. How badly is this affecting you guys? |
We can wait until april, no problem. We have a workarround in place. Should I still reopen the issue? |
Hm. The issue is referring to the resolving the dll in the context of 32 bit processes. The issue youre describing here is when we specifically target either x86 or x64. The build doesn't properly output the dll in those cases. How about I create a new issue with the issue specified? "The SDK does not correctly output Yubico.NativeShims.dll when targeting x86 or x64" and link in this issue. Is that OK for you @romerod ? Im grateful for your input. I don't get to talk to many users of our SDK :P |
Uh oh!
There was an error while loading. Please reload this page.
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
System.BadImageFormatException
Version
Affects all versions
Version
Affects all versions
The text was updated successfully, but these errors were encountered: