-
Notifications
You must be signed in to change notification settings - Fork 383
Description
Describe the bug
The WinAppRuntime Installer fails to install if a packaged app using WinAppSDK has already been installed. It seems as if fails while trying to update the existing packages and therefore fails to install the remaining packages that are needed for an unpacakged app.
Steps to reproduce the bug
First, uninstall all versions of WinAppRuntime by using an admin PowerShell to replicate a "clean" computer...
$winappsdk = "Microsoft.WindowsAppRuntime.1.0*"
Get-AppxPackage | Where-Object { $_.Dependencies -like $winappsdk } | Remove-AppxPackage
Get-AppxPackage $winappsdk | Remove-AppxPackage
Then, install a MSIX WinUI 3 app like https://github.com/andrewleader/WindowsAppSDKGallery/releases/download/v0.39.1.0/WindowsAppSDKGallery_0.39.1.0_AnyCPU.msix (you'll have to add the certificate before installing)
Then, try running the x64 Installer to prep for using an unpackaged app: https://aka.ms/windowsappsdk/1.0-stable/msix-installer
Notice the following errors appear...
Installing license: WAR_MAINPACKAGE_LICENSE
Install result : 0x0
Deploying package: Microsoft.WindowsAppRuntime.1.0_0.319.455.0_x64__8wekyb3d8bbwe
Package deployment result : 0x80073cfb The provided package is already installed, and reinstallation of the package was blocked. Check the AppXDeployment-Server event log for details.
One or more install operations failed. Result: 0x80073cfb
[process exited with code 2147958011]
Try running an unpackaged app like https://github.com/andrewleader/WindowsAppSDKGallery/releases/download/v0.39.1.0/WindowsAppSDKGallery-unpackaged-0.39.1.0.zip (extract the ZIP and then double click WindowsAppSDKGallery.exe
)
Notice the EXE crashes (nothing visible appears since fails before XAML starts up).
Uninstall all WinAppRuntime using the same PowerShell script at the start, and then try running the x64 Installer again and try using the unpackaged app again. Notice this time it works fine.
Expected behavior
Should be able to install unpackaged apps regardless of whether packaged apps have already been installed.
Screenshots
No response
NuGet package version
1.0.0
Packaging type
Unpackaged
Windows version
Insider Build (xxxxx)
IDE
Visual Studio 2022
Additional context
No response