Search code examples
maui

How to deploy .net to .msixbundle


I try to replace my dedicated WinUI Version of an app with the one I published from my .net MAUI project. With this command I was able to publish an MSIX file:

dotnet publish -c Release -f:net7.0-windows10.0.22621.0

Unfortunately, when I upload it to the Parnter Center to submit it to the Windows Store I get this error:

A previous submission for this app was released with a Windows 10/11 .msixbundle or .appxbundle. Subsequent submissions must continue to contain a Windows 10/11 .msixbundle or .appxbundle.

I tried adding the MsBuild parameters I used for WinUI but without success:

/p:AppxBundlePlatforms="x86|x64|ARM64"
/p:AppxBundle=Always
/p:UapAppxPackageBuildMode=CI

How can I publish my .net MAUI project as an .msixbundle or .appxbundle?


Solution

  • About how to build a MSIX bundle, you can refer to Bundle MSIX packages. It assumes that you have already converted your existing x86 and x64 versions of the Windows installer to MSIX packages. I tested it and .msixbundle file was created successfully.

    In addition, you can also read this document about Publish a .NET MAUI app for Windows with Visual Studio. It was recently updated. I also follow this step to publish a MSIX package.