How to enable auto-update with AppInstaller for MSIX Packages? #5125
-
DescriptionWhen publishing a MSIX package for a WinAppSDK app, the auto-update feature does not work as expected. Despite setting the update frequency to 'Every time the application runs' in Visual Studio, the app does not check for updates automatically and requires manual intervention. Related issues |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Root causeThe issue is caused by the default appInstaller schema version generated by Visual Studio, i.e., Solution
References: App Installer File Versioning |
Beta Was this translation helpful? Give feedback.
Root cause
The issue is caused by the default appInstaller schema version generated by Visual Studio, i.e.,
http://schemas.microsoft.com/appx/appinstaller/2017/2
, which does not support theShowPrompt
orUpdateBlocksActivation
attributes needed for the desired auto-update behavior.Solution
<GenerateAppInstallerFile>True</GenerateAppInstallerFile>
to the wapProj to generate the .appInstaller file.http://schemas.microsoft.com/appx/appinstaller/2021
.ShowPrompt
attribute to true andUpdateBlocksActivation
to true in theOnLaunch
element, like so:<OnLaunch HoursBetweenUpdateChecks="0" ShowPrompt="true" Updat…