启动时的 MSIX 更新失败 "Unable to install because the following apps need to be closed"

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

我有一个使用 MSIX 部署的 WPF 应用程序。 .appinstaller 设置为在启动时静默更新(无用户提示):

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

安装正常,但发布新版本后启动应用程序,更新失败,事件日志中显示以下消息:

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.

如果我关闭该应用程序,然后重新启动它,更新将顺利完成。

该错误的奇怪之处在于它似乎指的是正在更新的应用程序与需要关闭的应用程序相同..?

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

是旧版本号'2021.1013.1509.1577'的应用程序

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

是新版本'2021.1013.1518.1578'

为什么更新失败并出现这个奇怪的错误?

显然,MSIX 需要在应用更新之前重新启动程序。所以我想第一次启动是否出错并不重要。它似乎按设计工作。