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

V 1.9 Breaks Winget PowerShell Module (Microsoft.VCLibs.140.00.UWPDesktop Issue) #4916

Closed
PckgrTom opened this issue Oct 28, 2024 · 4 comments
Assignees
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation.
Milestone

Comments

@PckgrTom
Copy link

PckgrTom commented Oct 28, 2024

Add-AppxPackage: Deployment failed with HRESULT: 0x80073CF3, Package failed updates, dependency or conflict validation. Windows cannot
install package Microsoft.DesktopAppInstaller_1.24.25180.0_x64__8wekyb3d8bbwe because this package depends on a
framework that could not be found. Provide the framework "Microsoft.VCLibs.140.00.UWPDesktop" published by
"CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US", with neutral or x64 processor
architecture and minimum version 14.0.33728.0, along with this package to install. The frameworks with name
"Microsoft.VCLibs.140.00.UWPDesktop" currently installed Windows cannot install package
Microsoft.DesktopAppInstaller_1.24.25180.0_x64__8wekyb3d8bbwe because this package depends on a framework that could
not be found. Provide the framework "Microsoft.VCLibs.140.00.UWPDesktop" published by "CN=Microsoft Corporation,
O=Microsoft Corporation, L=Redmond, S=Washington, C=US", with neutral or x64 processor architecture and minimum version
14.0.33728.0, along with this package to install. The frameworks with name "Microsoft.VCLibs.140.00.UWPDesktop"
currently installed are: {Microsoft.VCLibs.140.00.UWPDesktop_14.0.33321.0_x64__8wekyb3d8bbwe} NOTE: For additional
information, look for [ActivityId] 8219baaf-8b1d-0001-d2cd-3bce6329db01 in the Event Log or use the command line
Get-AppPackageLog -ActivityID 8219baaf-8b1d-0001-d2cd-3bce6329db01
Error: Process completed with exit code 1.`

Steps to reproduce

Attempt to install the Winget PowerShell module

Expected behavior

Module install successfully

Actual behavior

Module is failing to install winget due to out of date dependency for Microsoft.VCLibs.140.00.UWPDesktop.

Environment

N/A

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage Issue need to be triaged label Oct 28, 2024
@denelon denelon added Issue-Bug It either shouldn't be doing this or needs an investigation. and removed Needs-Triage Issue need to be triaged labels Oct 28, 2024
@denelon denelon added this to WinGet Oct 28, 2024
@denelon denelon moved this to To Do in WinGet Oct 28, 2024
@denelon denelon moved this from To Do to In Progress in WinGet Oct 28, 2024
@denelon denelon pinned this issue Oct 28, 2024
@Trenly
Copy link
Contributor

Trenly commented Oct 28, 2024

This has the same root cause as:

@denelon
Copy link
Contributor

denelon commented Oct 29, 2024

We've marked the latest stable release as "Pre-Release" here at GitHub so the Repair-WinGetPackageManager cmdlet will still install a stable release. It will install WinGet 1.8 in that case.

The version delivered by the Microsoft Store is still the latest stable 1.9 version. This change is temporary until we've addressed the dependency for Repair-WinGetPackageManager to function properly installing the dependencies necessary for WinGet 1.9.

@juwens
Copy link

juwens commented Oct 29, 2024

@denelon please consider adding the two dependency appx files into every github releases.
That would simplify the bootstraping in sandbox too.

You would be independent of what version is linked to https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx, especially beneficial in the long run.

Bootstrap-Installation can be simplified to three simple steps.
(this can be simplified into two steps, if you put the dependencies into the msixbundle)

iwr https://github.com/microsoft/winget-cli/releases/download/v1.8.1911/Microsoft.DesktopAppInstaller.WithDependencies.zip -OutFile AppInstaller.zip
Expand-Archive AppInstaller.zip .
Add-AppxPackagage AppInstallerDesktop.msixbundle -DependencyPath Dependencies/*

AFAIK you get the dependencies appx files by default, when you run msbuild -t:publish ...

IMO these steps are far more straight-forward and consistent/deterministic than downloading the files from three different sources (where have limited control of the actual version of the Dependencies):

from https://learn.microsoft.com/en-us/windows/package-manager/winget/#install-winget-on-windows-sandbox :

$progressPreference = 'silentlyContinue'
Write-Information "Downloading WinGet and its dependencies..."
Invoke-WebRequest -Uri https://aka.ms/getwinget -OutFile Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle
Invoke-WebRequest -Uri https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx -OutFile Microsoft.VCLibs.x64.14.00.Desktop.appx
Invoke-WebRequest -Uri https://github.com/microsoft/microsoft-ui-xaml/releases/download/v2.8.6/Microsoft.UI.Xaml.2.8.x64.appx -OutFile Microsoft.UI.Xaml.2.8.x64.appx
Add-AppxPackage Microsoft.VCLibs.x64.14.00.Desktop.appx
Add-AppxPackage Microsoft.UI.Xaml.2.8.x64.appx
Add-AppxPackage Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle

And even more consistent and straight-forward then the suggested alternative:

$progressPreference = 'silentlyContinue'
Install-PackageProvider -Name NuGet -Force | Out-Null
Install-Module -Name Microsoft.WinGet.Client -Force -Repository PSGallery | Out-Null
Repair-WinGetPackageManager -IncludePrerelease

The repair-solution is fine, but quite obfuscated. When you know, that you just need to Download three files (which can be in one zip/msixbundle) and invoke one Add-AppxPackage.

@denelon
Copy link
Contributor

denelon commented Nov 1, 2024

The updated module was just published: https://www.powershellgallery.com/packages/Microsoft.WinGet.Client/1.9.25190

Please let us know if this works or is still broken for you?

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.
Projects
Status: Released
Development

No branches or pull requests

5 participants