【发布时间】:2022-10-16 19:17:06
【问题描述】:
我最近将我的 UWP 应用程序迁移到 WinUI3。但是,我现在正在努力将其上传到 Microsoft Store。
如果我上传 .msix 包,网页会告诉我,因为之前上传的包是 .msixupload 或 .msixbundle,所以我只能上传其中一个。
Visual Studio 中的应用程序包向导运行并生成 .msix 包,但我尝试过的任何方法都无法成功生成 .msixupload 或 .msixbundle。 .csproj 看起来像:
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows10.0.19041.0</TargetFramework>
<TargetPlatformMinVersion>10.0.18362.0</TargetPlatformMinVersion>
<ApplicationManifest>app.manifest</ApplicationManifest>
<Platforms>x86;x64;arm64</Platforms>
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
<PublishProfile>win10-$(Platform).pubxml</PublishProfile>
<UseWinUI>true</UseWinUI>
<EnableMsixTooling>true</EnableMsixTooling>
<GenerateTemporaryStoreCertificate>True</GenerateTemporaryStoreCertificate>
<DefaultLanguage>en-us</DefaultLanguage>
<AppxAutoIncrementPackageRevision>True</AppxAutoIncrementPackageRevision>
<AppxBundle>Always</AppxBundle>
<AppxBundlePlatforms>x86|x64</AppxBundlePlatforms>
<AssemblyName>[App name]</AssemblyName>
<UseAppLocalCoreFramework>true</UseAppLocalCoreFramework>
<HoursBetweenUpdateChecks>1</HoursBetweenUpdateChecks>
<AppxPackageSigningTimestampDigestAlgorithm>SHA256</AppxPackageSigningTimestampDigestAlgorithm>
<GenerateAppInstallerFile>False</GenerateAppInstallerFile>
<AppxSymbolPackageEnabled>True</AppxSymbolPackageEnabled>
<GenerateTestArtifacts>True</GenerateTestArtifacts>
<AppxPackageDir>[path]\App\AppPackages\</AppxPackageDir>
</PropertyGroup>
相反,我制作了一个 .msixbundle manually。但是,当我尝试上传它时,我得到了错误: [包名称和版本].0.msixbundle 的包文件格式无效:HRESULT 异常:0x80510007
有谁知道如何解决此错误或让 Visual Studio 生成可以上传的 .msixupload 或 .msixbundle?
即使将我指向一个确实生成捆绑包的 WinUI3 项目也会非常有帮助。
【问题讨论】:
标签: c# visual-studio winui-3