-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Microsoft.WinGet.Client PowerShell Module failing to load on Arm64 in PowerShell 7.x #4169
Labels
In-PR
Issue related to a PR
Issue-Bug
It either shouldn't be doing this or needs an investigation.
PowerShell
Issue related to WinGet PowerShell Module or cmdlet
Milestone
Comments
This comment was marked as off-topic.
This comment was marked as off-topic.
v1.7.10651 issues:
|
2 tasks
This was referenced Apr 19, 2024
msftrubengu
added a commit
that referenced
this issue
Apr 20, 2024
This PR enables arm64 for the Microsoft.WinGet.Client module. There's an OS bug that causes an AV (see #4251 (comment)) in arm64 devices that was fixed in a newer Windows build. The AV message is just shown for PowerShell Core. In Windows PowerShell no error message is displayed but it won't display progress either. Regardless, the winget install/uninstall operation still happens as the progress is shown after we asked winget to install the app. The configuration module doesn't get affected by the OS bug, so there's no need to disable progress. To keep showing progress the module now looks at the OS version. If the processor architecture is arm64 and the OS version is lower than 10.0.26068.0 progress is disabled in the module. I verified manually on arm64 builds with and without the fix. Fixes #4169 ###### Microsoft Reviewers: [Open in CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/microsoft/winget-cli/pull/4392)
msftrubengu
pushed a commit
that referenced
this issue
Apr 22, 2024
<!-- To check a checkbox place an "x" between the brackets. e.g: [x] --> - [X] I have signed the [Contributor License Agreement](https://cla.opensource.microsoft.com/microsoft/winget-pkgs). - [X] This pull request is related to an issue. - Resolves: #4169 ----- This PR addresses an issue that prevents the WinGet Cmdlets from loading in an Arm64 PowerShell 7.x environment. ###### Microsoft Reviewers: [Open in CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/microsoft/winget-cli/pull/4251)
msftrubengu
added a commit
to msftrubengu/winget-cli
that referenced
this issue
Apr 23, 2024
This PR enables arm64 for the Microsoft.WinGet.Client module. There's an OS bug that causes an AV (see microsoft#4251 (comment)) in arm64 devices that was fixed in a newer Windows build. The AV message is just shown for PowerShell Core. In Windows PowerShell no error message is displayed but it won't display progress either. Regardless, the winget install/uninstall operation still happens as the progress is shown after we asked winget to install the app. The configuration module doesn't get affected by the OS bug, so there's no need to disable progress. To keep showing progress the module now looks at the OS version. If the processor architecture is arm64 and the OS version is lower than 10.0.26068.0 progress is disabled in the module. I verified manually on arm64 builds with and without the fix. Fixes microsoft#4169 ###### Microsoft Reviewers: [Open in CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/microsoft/winget-cli/pull/4392)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
In-PR
Issue related to a PR
Issue-Bug
It either shouldn't be doing this or needs an investigation.
PowerShell
Issue related to WinGet PowerShell Module or cmdlet
Brief description of your issue
On Windows Arm64 machines running PowerShell 7.x, the
Microsoft.WinGet.Client.Engine
andMicrosoft.WinGet.Client.Cmdlets
assemblies fail to load properly since only x86 and x64 assemblies are bundled with the NuGet package.Steps to reproduce
Install-Module Microsoft.WinGet.Client -RequiredVersion 0.2.1 -Scope User
in PowerShell 7.4.1+Get-WinGetSettings
CmdletGet-WinGetVersion
CmdletExpected behavior
A list of settings schema and the actual WinGet version
Actual behavior
Get-WinGetVersion: Could not load file or assembly 'Microsoft.WinGet.Client.Engine, Version=1.21.0.0, Culture=neutral, PublicKeyToken=null'. Uncaught exception during type initialization. (0x80131534)
Also, when using the PowerToys Command Not Found functionality, it fails to load
Microsoft.WinGet.Client.Cmdlets.dll
for the same reason, due to the logic in the Microsoft.WinGet.Client moduleThe
Microsoft.WinGet.Client
package only includes dlls targetingwin10-x86
andwin10-x64
runtimes. For completion, the packages must also includewin10-arm64
compiled dlls and dependencies, along with the logic changed to account for Arm64 process architecture when loading dlls properly.Environment
The text was updated successfully, but these errors were encountered: