为什么每次应用程序运行时

为什么每次应用程序运行时

本文介绍了当启用旁加载时,为什么每次应用程序运行时 MSIX 不会自动检查更新?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题:

当启用旁加载时,为什么每次应用程序运行时 MSIX 不会自动检查更新?

Why does the MSIX not automatically check for updates every time the application runs when sideloading is enabled?

上下文:

我们正在将 WPF 应用程序迁移到 Azure,并创建了一个启用旁加载的 MSIX 安装程序,并设置为在每次应用程序启动时检查更新.因此,*.appinstaller 文件如下:

We are migrating a WPF application to Azure and have created an MSIX installer with sideloading enabled and set to check for updates every time the application launches. Accordingly, the *.appinstaller file is as follows:

<?xml version="1.0" encoding="utf-8"?>
<AppInstaller
    Uri="https://<AppService>.azurewebsites.net/<AppName>.Setup.appinstaller"
    Version="1.0.1.0" xmlns="http://schemas.microsoft.com/appx/appinstaller/2017/2">
    <MainBundle
        Name="<SomeGuid>"
        Version="1.0.1.0"
        Publisher="CN=<CertificateName>"
        Uri="https://<AppService>.azurewebsites.net/<AppName>.Setup_1.0.1.0_Development_Test/<AppName>.Setup_1.0.1.0_x64_Development.msixbundle" />
    <UpdateSettings>
        <OnLaunch
            HoursBetweenUpdateChecks="0" />
    </UpdateSettings>
</AppInstaller>

不幸的是,每次我们向 Azure 发布包的更新时,应用程序不会自动检查任何更新,因此它不会提示我们更新.但是,当我们转到应用程序已发布的网络链接并单击安装时,安装程​​序会看到该应用程序已安装并且有可用更新.

Unfortunately, every time we publish an update to the package to Azure, the application does not automatically check for any updates, and so it does not prompt us to update. However, when we go to the application's published weblink and click to install, the installer will see that the application is already installed and that an update is available.

疑难解答:

我们尝试将应用清单的内容 URI(选项卡)添加到 *.appinstaller 站点,但这不起作用.我注意到 *.appinstaller 将文本 _Test 附加到路径名.我不确定为什么要添加它.我尝试重新创建安装程序包以排除任何潜在的配置错误.这可能是问题的根源吗?

We tried adding to the app manifest's Content URI (tab) to the *.appinstaller site, but that did not work. I noticed that the *.appinstaller is appending the text _Test to the path name. I am not sure why that is being added. I have tried recreating the installer package in order to rule out any potential configuration errors. Could that be the source of the problem?

我还启用了 Use developer feature 并遵循 Microsoft 在此处提供的所有其他说明:https://docs.microsoft.com/en-us/windows/application-management/sideload-apps-in-windows-10

I have also enabled Use developer feature and followed all other instructions provided by Microsoft here: https://docs.microsoft.com/en-us/windows/application-management/sideload-apps-in-windows-10

注意:我们尝试创建一个 ClickOnce 发布配置文件并且有效.为什么旁加载适用于 ClickOnce 而不是 MSIX 是没有意义的.

Note: we tried creating a ClickOnce publish profile and that works. It does not make sense why sideloading works for ClickOnce but not MSIX.

推荐答案

从我所见 这里 您需要将架构更新到 2018 年:

From what I see here you need to update the schema to 2018:

 xmlns="http://schemas.microsoft.com/appx/appinstaller/2018"

另外,您运行的是哪个版本的 Windows 10?我看到 appinstaller 更新设置逐步引入,旧版本的Win 10不支持所有这些.

Also, what version of Windows 10 are you running? I see the appinstaller update settings have been introduced gradually, older versions of Win 10 do no support all of them.

2019 年的另一个旧问题似乎突出了 通过桌面或任务栏快捷方式启动的应用程序的限制.

Another older issue from 2019 seems to highlight a limitation for apps launched via a desktop or taskbar shortcut.

这篇关于当启用旁加载时,为什么每次应用程序运行时 MSIX 不会自动检查更新?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 19:05