Forum Discussion
MSIX Packages with WebView2 Dependency now fail to install
Providing more information about the issue AND A WORKAROUND.
NOTE: It does appear that Microsoft has solved the generic winget issue I mentioned that required the --accept parameters on newly patched systems today. But the reported problem of installing an MSIX package with the WebView2 dependency remains.
When installing a package which includes the WebView2 external dependency (and associated Capability declaration) in the AppXManifest:
- On Windows 11 23H2
- AppInstaller version 1.24.25200.0
The AppInstaller fails to install with the following reason:
App Installer failed to install package dependencies. Ask the developer for package Microsoft.WebView2.
Get-AppXLog and Get-AppXLastError return nothing.
In the AppXPackagingOM Information log we see the following with Event ID 216:
App manifest validation warning: Declared namespace http://schemas.microsoft.com/appx/manifest/externaldependencies is inapplicable, it will be ignored during manifest processing.
I believe the above message is misleading as I see signs of the externaldepency attempting to be processed, but to be clear that the namespace should be applicable I point to the documentation win32dependencies:ExternalDependency (Windows 10, Windows 11) - Windows UWP applications | Microsoft Learn which has the following requirements listed in the remarks section:
This feature requires that Microsoft App Installer version 1.16.12651.0 or later be installed on the target machine.
Manually installing the winget package without elevation fails:
PS C:\Users\admin> winget install --id Microsoft.EdgeWebView2Runtime
Found Microsoft Edge WebView2 Runtime [Microsoft.EdgeWebView2Runtime] Version 131.0.2903.70
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://msedge.sf.dl.delivery.mp.microsoft.com/filestreamingservice/files/91530f73-1202-471b-86a9-a3b1d9655560/MicrosoftEdgeWebView2RuntimeInstallerX64.exe
██████████████████████████████ 173 MB / 173 MB
Successfully verified installer hash
Starting package install...
Installer failed with exit code: 2147747880
Running the same winget command in an elevated window does succeed:
PS C:\Users\admin> winget install --id Microsoft.EdgeWebView2Runtime
Found Microsoft Edge WebView2 Runtime [Microsoft.EdgeWebView2Runtime] Version 131.0.2903.70
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Successfully verified installer hash
Starting package install...
Successfully installed.
However, even with the dependency installed this does not solve the problem with an un-elevated installation of the package. We see messages in AppInstaller that it is attempting "installing required frameworks", then the same message:
App Installer failed to install package dependencies. Ask the developer for package Microsoft.WebView2.
Attempting to install the package using powershell in an elevated window now works:
add-appxpackage \\nuc7\Packages\TMEditX.5.2.0.0\WinZip_25.0.0.1_x64__xwfzvwzp69w2e.msix
Elevation was not required for installing packages with a WebView2 dependency in the past. This is a breaking change.