Skip to content

[Bug]: Fails to install if you are using Windows Sandbox for testing. #25

@skadlec72

Description

@skadlec72

Describe the problem

Fails to install all requirements.
Running this script works:
set-executionpolicy unrestricted -force -scope CurrentUser
$progressPreference = 'silentlyContinue'
$latestWingetMsixBundleUri = $(Invoke-RestMethod https://api.github.com/repos/microsoft/winget-cli/releases/latest).assets.browser_download_url | Where-Object { $_.EndsWith(".msixbundle") }
$latestWingetMsixBundle = $latestWingetMsixBundleUri.Split("/")[-1]
Write-Information "Downloading winget to artifacts directory..."
Invoke-WebRequest -Uri $latestWingetMsixBundleUri -OutFile $env:TEMP$latestWingetMsixBundle
Invoke-WebRequest -Uri https://github.com/microsoft/microsoft-ui-xaml/releases/download/v2.8.6/Microsoft.UI.Xaml.2.8.x64.appx -OutFile $env:TEMP\Microsoft.UI.Xaml.2.8.x64.appx
Invoke-WebRequest -Uri https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx -OutFile $env:TEMP\Microsoft.VCLibs.x64.14.00.Desktop.appx
Add-AppxPackage $env:TEMP\Microsoft.VCLibs.x64.14.00.Desktop.appx
Add-AppxPackage $env:TEMP\Microsoft.UI.Xaml.2.8.x64.appx
Add-AppxPackage $env:TEMP$latestWingetMsixBundle
winget search microsoft --accept-source-agreements

Expectation

Install the lasted versions of the requirements and winget.

Additional Information

install-winget
Add-AppxPackage : Deployment failed with HRESULT: 0x80073CF3, Package failed updates, dependency or conflict validation.
Windows cannot install package Microsoft.DesktopAppInstaller_1.23.1911.0_x64__8wekyb3d8bbwe because this package depends on a
framework that could not be found. Provide the framework "Microsoft.UI.Xaml.2.8" published by "CN=Microsoft Corporation,
O=Microsoft Corporation, L=Redmond, S=Washington, C=US", with neutral or x64 processor architecture and minimum version
8.2310.30001.0, along with this package to install.
NOTE: For additional information, look for [ActivityId] 07c5f442-ef52-000b-3cde-c60752efda01 in the Event Log or use the command
line Get-AppPackageLog -ActivityID 07c5f442-ef52-000b-3cde-c60752efda01
At C:\Program Files\WindowsPowerShell\Modules\wingettools\1.7.0\functions\Install-Winget.ps1:68 char:13

  •         Add-AppxPackage -Path $file -ErrorAction Stop
    
  •         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : WriteError: (C:\Users\WDAGUT...bbwe.msixbundle:String) [Add-AppxPackage], IOException
    • FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.AddAppxPackageCommand

PowerShell version

5.1

Platform

Windows 11 Pro or Enterprise

Additional Checks

  • You are using the latest version of this module.
  • You have read this repository's README file.
  • You have read full help and examples for the command you are having problems with.
  • You are running PowerShell in an elevated session.
  • You are running in a traditional PowerShell console or Windows Terminal

Metadata

Metadata

Labels

bugSomething isn't workingtriagenew issue that needs review

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions