This tutorial walks you through the steps required to package, publish, and distribute a .NET Multi-platform App UI (MAUI) application for the Windows operating system.
Open your MAUI solution in Visual Studio and ensure the Windows platform is targeted.
dotnet new maui -n MyMauiApp
cd MyMauiApp
dotnet build -t:Run -f net8.0-windows10.0.19041.0
MSIX is Microsoft’s modern packaging format. Follow these steps to generate an MSIX package.
MyMauiApp
project → Publish → Folder.win10-x64
(or win10-arm64
for ARM)..msix
and .appxupload
files.Windows requires a signed package. You can use a test certificate for development or a trusted certificate for production.
# Generate a test certificate (once)
makecert -r -pe -n "CN=MyMauiAppTestCert" -ss My -sr LocalMachine -a sha256 -len 2048 -sky exchange -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12
# Sign the MSIX
signtool sign /fd SHA256 /a /f MyMauiAppTestCert.pfx /p <password> MyMauiApp.msix
Install the signed MSIX on your machine to validate installation and runtime behavior.
powershell -Command "Add-AppxPackage -Path .\MyMauiApp.msix"
Use the Microsoft Partner Center to submit your package.
.msix
file.Integrate the packaging steps into GitHub Actions or Azure Pipelines for automated builds.
name: Build & Deploy MAUI Windows
on:
push:
branches: [ main ]
jobs:
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.x'
- name: Restore & Build
run: dotnet publish -c Release -f net8.0-windows10.0.19041.0 -r win10-x64 /p:PublishReadyToRun=true /p:UseAppHost=true
- name: Create MSIX
run: |
dotnet msbuild MyMauiApp.csproj /t:Package /p:Configuration=Release /p:Platform=x64 /p:AppxPackageSigningEnabled=true /p:PackageCertificateThumbprint=${{ secrets.CERT_THUMBPRINT }}
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: msix-package
path: bin\Release\net8.0-windows10.0.19041.0\win10-x64\AppPackages\*.msix
Issue | Resolution |
---|---|
Package fails to install with error 0x80073B01 | Ensure the certificate is trusted on the target machine or use a dev test certificate and enable sideloading. |
App crashes on startup | Check the Windows Event Viewer for .NET exception logs; verify all required native dependencies are packaged. |
Store submission rejected: “App does not meet content policy” | Review the Store Policies and update screenshots/metadata accordingly. |