UWP app Sideloading - AppInstaller未安装应用程序



我正在尝试使用。appinstaller安装UWP应用程序。在我的笔记本电脑的操作系统是在1909年之前,这个工作很好。我们最近在22年5月升级到21H2后,它停止安装并显示错误:-"App installation failed with error message: Appinstaller operation failed with error code 0x80D03002。详细信息:未知错误(0x80d03002)">

如果我运行MSIX文件,它也可以很好地安装在21H2上。

已经尝试按照AppInstaller XML问题中的建议启动交付优化服务-似乎没有解决问题。
AppInstaller的xml代码如下:-

Below is the xml code for AppInstaller:-
<?xml version="1.0" encoding="utf-8"?>
<AppInstaller
Uri="http://XXX/TestApp.UWP.appinstaller"
Version="2.2112.0.0" xmlns="http://schemas.microsoft.com/appx/appinstaller/2017/2">
<MainBundle
Name="TestUI"
Version="2.2112.0.0"
Publisher="CN=Test, OU=GIS, O=&quot;Test Corporation &quot;, L=Fremont, S=California, C=US"
Uri="http://XXX/TestApp.UWP_2.2112.0.0_Test/TestApp.UWP_2.2112.0.0_x64.msixbundle" />
<Dependencies>
<Package
Name="Microsoft.UI.Xaml.2.4"
Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US"
ProcessorArchitecture="x64"
Uri="http://XXX/TestApp.UWP_2.2112.0.0_Test/Dependencies/x64/Microsoft.UI.Xaml.2.4.appx"
Version="2.42007.9001.0" />
<Package
Name="Microsoft.NET.Native.Framework.2.2"
Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US"
ProcessorArchitecture="x64"
Uri="http://XXX/TestApp.UWP_2.2112.0.0_Test/Dependencies/x64/Microsoft.NET.Native.Framework.2.2.appx"
Version="2.2.29512.0" />
<Package
Name="Microsoft.NET.Native.Runtime.2.2"
Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US"
ProcessorArchitecture="x64"
Uri="http://XXX/TestApp.UWP_2.2112.0.0_Test/Dependencies/x64/Microsoft.NET.Native.Runtime.2.2.appx"
Version="2.2.28604.0" />
<Package
Name="Microsoft.VCLibs.140.00"
Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US"
ProcessorArchitecture="x64"
Uri="http://XXX/TestApp.UWP_2.2112.0.0_Test/Dependencies/x64/Microsoft.VCLibs.x64.14.00.appx"
Version="14.0.29231.0" />
</Dependencies>
<UpdateSettings>
<OnLaunch
HoursBetweenUpdateChecks="0" />
</UpdateSettings>
</AppInstaller>

我终于找到原因了。即使它是作为网站托管的AppInstaller也无法访问Uri,所以我没有使用Uri = "http://",而是使用了本地文件路径Uri = "file://"

修复:

<?xml version="1.0" encoding="utf-8"?>
<AppInstaller
Uri="file://XXX/TestApp.UWP.appinstaller"
Version="2.2112.0.0" xmlns="http://schemas.microsoft.com/appx/appinstaller/2017/2">
<MainBundle
Name="TestUI"
Version="2.2112.0.0"
Publisher="CN=Test, OU=GIS, O=&quot;Test Corporation &quot;, L=Fremont, S=California, C=US"
Uri="file://XXX/TestApp.UWP_2.2112.0.0_Test/TestApp.UWP_2.2112.0.0_x64.msixbundle" />
<Dependencies>
<Package
Name="Microsoft.UI.Xaml.2.4"
Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US"
ProcessorArchitecture="x64"
Uri="file://XXX/TestApp.UWP_2.2112.0.0_Test/Dependencies/x64/Microsoft.UI.Xaml.2.4.appx"
Version="2.42007.9001.0" />
<Package
Name="Microsoft.NET.Native.Framework.2.2"
Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US"
ProcessorArchitecture="x64"
Uri="file://XXX/TestApp.UWP_2.2112.0.0_Test/Dependencies/x64/Microsoft.NET.Native.Framework.2.2.appx"
Version="2.2.29512.0" />
<Package
Name="Microsoft.NET.Native.Runtime.2.2"
Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US"
ProcessorArchitecture="x64"
Uri="file://XXX/TestApp.UWP_2.2112.0.0_Test/Dependencies/x64/Microsoft.NET.Native.Runtime.2.2.appx"
Version="2.2.28604.0" />
<Package
Name="Microsoft.VCLibs.140.00"
Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US"
ProcessorArchitecture="x64"
Uri="file://XXX/TestApp.UWP_2.2112.0.0_Test/Dependencies/x64/Microsoft.VCLibs.x64.14.00.appx"
Version="14.0.29231.0" />
</Dependencies>
<UpdateSettings>
<OnLaunch
HoursBetweenUpdateChecks="0" />
</UpdateSettings>
</AppInstaller>

出于安全考虑,微软暂时禁用了appinstaller协议。点击下面的链接了解更多细节。

https://techcommunity.microsoft.com/t5/msix/the-ms-appinstaller-protocol-has-been-disabled/m-p/3038361

最新更新