You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何为微软商店生成App Manifest文件及解决MSIX上传问题

解决Flutter Windows应用MSIX上传微软商店的问题

1. 修复App Manifest缺失问题

  • Flutter的msix包会根据pubspec.yaml中的msix配置自动生成AppxManifest.xml,如果没找到,先检查配置是否完整,示例如下:
    msix_config:
      display_name: 你的应用名称
      publisher_display_name: 你的发布者名称
      publisher: CN=你的发布者证书主题(需和微软商店信息一致)
      identity_name: 你的应用身份名称(从Partner Center获取)
      version: 1.0.0.0
      capabilities: internetClient, privateNetworkClientServer
    
    配置完成后重新执行flutter pub run msix:create生成MSIX,此时AppxManifest.xml会嵌入包内,也可在build/windows/msix临时目录找到。
  • 若需手动创建AppxManifest.xml,核心结构需和微软商店信息完全匹配,示例如下:
    <?xml version="1.0" encoding="utf-8"?>
    <Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
             xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
             IgnorableNamespaces="uap">
      <Identity Name="你的应用身份名称" Publisher="你的发布者证书主题" Version="1.0.0.0" />
      <Properties>
        <DisplayName>你的应用显示名</DisplayName>
        <PublisherDisplayName>你的发布者显示名</PublisherDisplayName>
        <Logo>Assets\StoreLogo.png</Logo>
      </Properties>
      <Dependencies>
        <TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.22621.0" />
      </Dependencies>
      <Resources>
        <Resource Language="zh-CN" />
      </Resources>
      <Applications>
        <Application Id="App" Executable="你的应用.exe" EntryPoint="Windows.FullTrustApplication">
          <uap:VisualElements DisplayName="你的应用显示名" Description="你的应用描述"
                             Square150x150Logo="Assets\Square150x150Logo.png"
                             Square44x44Logo="Assets\Square44x44Logo.png"
                             BackgroundColor="#FFFFFF">
            <uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png" />
            <uap:SplashScreen Image="Assets\SplashScreen.png" />
          </uap:VisualElements>
        </Application>
      </Applications>
      <Capabilities>
        <Capability Name="internetClient" />
      </Capabilities>
    </Package>
    

2. 生成符合微软商店要求的.msixupload/msixbundle

  • 不要直接打开MSIX文件,先执行flutter build windows生成Windows项目文件,然后打开build/windows/Runner.sln解决方案。
  • 在Visual Studio中右键点击Runner项目 → 选择发布 → 创建应用包。
  • 选择微软商店,登录开发者账号并关联对应应用,按照向导完成配置:
    • 选择需要的架构(如x64/arm64,多选可生成msixbundle)
    • 确认版本号、发布者信息与Partner Center完全一致
    • 完成向导后,VS会自动生成包含AppxManifest.xml的.msixupload文件(位于AppPackages目录),该文件可直接上传至Partner Center。

注意:MakeAppx.exe确实无法生成符合Partner Center要求的上传文件,必须通过Visual Studio官方打包流程处理,它会自动完成manifest关联、证书签名和包结构校验。

内容的提问来源于stack exchange,提问作者DktPhl2018

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.14 14:28:24