Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions docs/windows/deployment/publish-cli.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Use the CLI to publish packaged apps for Windows"
description: "Learn how to package and publish a packaged Windows .NET MAUI app with the dotnet publish command."
ms.date: 02/24/2026
ms.date: 05/18/2026
ms.custom: sfi-image-nochange
---

Expand Down Expand Up @@ -90,7 +90,7 @@ Add the following `<PropertyGroup>` node to your project file. This property gro

```xml
<PropertyGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows' and '$(Configuration)' == 'Release'">
<WindowsPackageType>Package</WindowsPackageType>
<WindowsPackageType>MSIX</WindowsPackageType>
<AppxPackageSigningEnabled>true</AppxPackageSigningEnabled>
<PackageCertificateThumbprint>AA11BB22CC33DD44EE55FF66AA77BB88CC99DD00</PackageCertificateThumbprint>
</PropertyGroup>
Expand All @@ -101,7 +101,9 @@ Add the following `<PropertyGroup>` node to your project file. This property gro

<!-- Place in PropertyGroup above once pfx export works: <PackageCertificateKeyFile>myCert.pfx</PackageCertificateKeyFile> <!-- Optional if you want to use the exported PFX file -->

The `<WindowsPackageType>` property specifies that the app should be published as a packaged MSIX app. Setting this property explicitly is important for project types such as Blazor Hybrid, where the default may not produce an MSIX package. If you instead want to publish your app without an MSIX package, see [Publish an unpackaged .NET MAUI app for Windows with the CLI](publish-unpackaged-cli.md).
Setting `<WindowsPackageType>` to `MSIX` specifies that the app should be published as a packaged MSIX app. Setting this property explicitly is important for project types such as Blazor Hybrid, where the default may not produce an MSIX package. If you instead want to publish your app without an MSIX package, see [Publish an unpackaged .NET MAUI app for Windows with the CLI](publish-unpackaged-cli.md).

The supported `<WindowsPackageType>` values are `MSIX` for a packaged app, `None` for an unpackaged app, and `Sparse` for [packaging with external location](/windows/apps/package-and-deploy/packaging/#packaging-with-external-location-sparse-packaging). For more information about Windows App SDK packaging, see [Package your app using single-project MSIX](/windows/apps/windows-app-sdk/single-project-msix).

Replace the `<PackageCertificateThumbprint>` property value with the certificate thumbprint you previously generated. Alternatively, you can remove this setting from the project file and provide it on the command line. For example: `-p:PackageCertificateThumbprint=AA11BB22CC33DD44EE55FF66AA77BB88CC99DD00`.

Expand Down
Loading