Search code examples
msix

MSIX update on launch fails with "Unable to install because the following apps need to be closed"


I have a WPF app deployed with MSIX. The .appinstaller is set to update silently on launch (no user prompt):

<UpdateSettings>
    <OnLaunch HoursBetweenUpdateChecks="0" />
    <ForceUpdateFromAnyVersion>true</ForceUpdateFromAnyVersion>
</UpdateSettings>

Installation works, but after releasing a new version, then starting the app, the update fails with the following message in the event log:

AppX Deployment operation failed for package 8b7d5c25-92aa-4962-9e74-93b9685ce2ca-test_2021.1013.1518.1578_neutral_~_002e9dkagpm7g with error 0x80073D02. The specific error text for this failure is: error 0x80073D02: Unable to install because the following apps need to be closed 8b7d5c25-92aa-4962-9e74-93b9685ce2ca-test_2021.1013.1509.1577_x64__002e9dkagpm7g.

If I close the app, and then re-start it, the update finishes without problems.

The weird thing about the error is that it seems to refer to the same app that is being updated as the app that needs to be closed..?

8b7d5c25-92aa-4962-9e74-93b9685ce2ca-test_2021.1013.1509.1577_x64__002e9dkagpm7g

is the app with the old version number '2021.1013.1509.1577'

while

8b7d5c25-92aa-4962-9e74-93b9685ce2ca-test_2021.1013.1518.1578

is the new version '2021.1013.1518.1578'

Why does the update fail with this weird error?


Solution

  • Apparently, MSIX requires a second restart of the program before the update gets applied. So I guess it does not matter if the first start gives an error. It seems to be working as designed.