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

Repair-WinGetPackageManager does not handle missing Microsoft.UI.Xaml.2.7 or license #3374

Closed
JohnMcPMS opened this issue Jun 22, 2023 · 1 comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. PowerShell Issue related to WinGet PowerShell Module or cmdlet
Milestone

Comments

@JohnMcPMS
Copy link
Member

JohnMcPMS commented Jun 22, 2023

Description of the missing feature / enhancement

While it will handle installing the VCLibs dependency, it will not install Microsoft.UI.Xaml.2.7. It will also not apply the license file.

I believe that the goal of Repair-WinGetPackageManager is to have a functioning winget at the end, so it should handle these scenarios as well. The license will be automatically acquired if the machine is connected and capable, but that may not always be the case.

Proposed technical implementation details

The current best option is to follow the steps in #1861 , but it may be worth prodding the Xaml owners again for a direct release path.

Some investigation will be required for the license installation. A quick check makes it seem like there is no direct, public API to add a license file. It may require also allowing for Repair-WinGetPackageManager -AllUsers or similar so that Add-AppxProvisionedPackage can be used which will take in the license file.

@JohnMcPMS JohnMcPMS added the Issue-Bug It either shouldn't be doing this or needs an investigation. label Jun 22, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage Issue need to be triaged label Jun 22, 2023
@JohnMcPMS JohnMcPMS removed the Needs-Triage Issue need to be triaged label Jun 22, 2023
@denelon denelon added the PowerShell Issue related to WinGet PowerShell Module or cmdlet label Jun 26, 2023
@denelon denelon added this to the v.Next-Client milestone Jun 26, 2023
msftrubengu added a commit that referenced this issue Jul 14, 2023
This PR address #3374

Change
Make Repair-WinGetPackageManager repair known issues until its fixed or there's a non fixable state.
Adds support for installing Microsoft.UI.Xaml.2.7 package from their GitHub release.
Adds new parameter switch -AllUsers to Repair-WinGetPackageManager. If this is on, repair uses Add-AppxProvisionedPackage instead of Add-AppxPackage.
Adds new integrity category to detect winget.exe failures due to missing license. To fix it Repair-WinGetPackageManager -AllUsers must be executed in admin mode.
Fix adding preprocessor macros for net48. This cause Repair-WinGetPackageManager to always fail for Windows PowerShell.
There's a breaking change in Repair-WinGetPackageManager. It will now throw if there's an issue repairing. Good thing this is a "prerelease" module 🗡️
Validation
Test locally on machines where Microsoft.UI.Xaml.2.7 was not preinstalled and on Windows Server 2022.
@msftrubengu
Copy link
Contributor

Fixed by #3423

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. PowerShell Issue related to WinGet PowerShell Module or cmdlet
Projects
None yet
Development

No branches or pull requests

3 participants