-
Notifications
You must be signed in to change notification settings - Fork 50
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
[BUG] Dependency Exception in PowerShell 7.4.6 #184
Comments
The YubiKey SDK has a dependency on a native shared library: Unfortunately, the way that NuGet packages and PowerShell modules handle these kinds of dependencies are different. The recommended folder structure for PowerShell 7.4 is documented here: https://learn.microsoft.com/en-us/powershell/scripting/dev-cross-plat/writing-portable-modules?view=powershell-7.4&viewFallbackFrom=powershell-7#dependency-on-native-libraries For background, this is how .NET and NuGet handle it: https://learn.microsoft.com/en-us/nuget/create-packages/native-files-in-net-packages You will need to translate the folder structure of the |
Again: Where to download this file. It is not part of the assets. |
Which NuGet packages have you downloaded? You will need:
A nupkg file is simply a zip file with extra metadata. If you rename each file from
Within the extracted folder for |
Wow. I used the assets from github release. And there the NativeShims are missing since a few releases. I will try later again withe the other downloads. |
Got it. Even though NativeShims is part of this repo, since it does not change as often - and quite frankly, is complex to build and sign - it is typically not re-released with each version of the SDK. At least not on GitHub. Since .NET's typical consumption route is NuGet, that is where the focus is spent on releasing assets. But adding all libraries to each GitHub release page, regardless of update, can be something @DennisDyallo and @dainnilsson evaluate as part of their release process. |
@GregDomzalski Did you specified fixed version in the project dependencies? (PowerShell/vscode-powershell#4475) And by the way, version 1.0.0 of your SDK works fine in PowerShell 7.4.6. But is a bit old for using it. Error before adding MS assembly: PS $> [Yubico.Yubikey.YubikeyDevice]::FindAll()
MethodInvocationException: Exception calling "FindAll" with "0" argument(s): "Could not load file or assembly 'Microsoft.Extensions.Logging.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system can not find the specified file." After providing the file:
PS $> [Yubico.Yubikey.YubikeyDevice]::FindAll()
MethodInvocationException: Exception calling "FindAll" with "0" argument(s): "Could not load file or assembly 'Microsoft.Extensions.Configuration, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system can not find the specified file." |
Is there an existing issue for this?
Current Behavior
Expected Behavior
The properties of all connected devices are shown.
Steps To Reproduce
[Yubico.Yubikey.YubikeyDevice]::FindAll()
Version
1.12.1
Version
???
Anything else?
The text was updated successfully, but these errors were encountered: