-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Brief description of your issue
I have msix package that has WebView2 as dependency
<Dependencies>
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.22000.1" />
<win32dependencies:ExternalDependency Name="Microsoft.WebView2" Publisher="CN=Microsoft Windows, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" MinVersion="134.0.3124.72" Optional="false" />
</Dependencies>
On fresh installed Windows 11 I have 1.21 version of AppInstaller
(Get-AppxPackage Microsoft.DesktopAppInstaller).Version 1.21.10120.0
winget -v 1.6.10121
When try to install msix package, I got this error
App Installer failed to connect to the winget source for external package dependencies. Please report at https://aka.ms/winget-cli
The workaround is to set Optional=true, but then in this case it will not install MinVersion specified.
Then after running update for AppInstaller (via winget or via Microsoft Store)
winget update Microsoft.AppInstaller
It uses latest version
(Get-AppxPackage Microsoft.DesktopAppInstaller).Version – 1.25.340.0
winget -v v1.10.340
And msix installer with Optional="false" works and install required version.
It seems that there was some bug between 1.21.10120.0 and 1.25.340.0 versions, that breaks installation.
However there is lack of information shown during installation, so users can't figure out that they need to update AppInstaller. Windows updates also don't update AppInstaller. So the only option is that user should figure out by themselves that they need to upgrade AppInstaller or we can't force to install specific Webview version.
Following this – is there an option to specify dependency on concrete version of Microsoft.DesktopAppInstaller in msix package? tried to add the following
<PackageDependency Name="Microsoft.AppInstaller"
MinVersion="1.25.340.0"
Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" />
But it then return App Installer failed to install package dependencies.
Steps to reproduce
- Build msix package with mandatory dependency Microsoft.WebView2 dependency
- Install fresh Windows 11
- Try to install this msix package
Expected behavior
should be able to instal msix package with mandatory WebView2 dependency on fresh Windows 11 installation
Actual behavior
Failed to install msix package with mandatory WebView2 dependency on fresh Windows 11 installation
Environment
>winget --info
Windows Package Manager v1.6.10121
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.26100.3476
System Architecture: Arm64
Package: Microsoft.DesktopAppInstaller v1.21.10120.0
after update
Windows Package Manager v1.10.340
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.26100.3476
System Architecture: Arm64
Package: Microsoft.DesktopAppInstaller v1.25.339.0