Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 3 additions & 1 deletion docs/TOC.yml
Original file line number Diff line number Diff line change
Expand Up @@ -788,8 +788,10 @@
items:
- name: Overview
href: windows/deployment/overview.md
- name: Publish with the .NET CLI
- name: Publish a packaged app with the .NET CLI
href: windows/deployment/publish-cli.md
- name: Publish an unpackaged app with the .NET CLI
href: windows/deployment/publish-unpackaged-cli.md
- name: Publish with Visual Studio to a folder
href: windows/deployment/publish-visual-studio-folder.md
- name: Troubleshooting
Expand Down
7 changes: 3 additions & 4 deletions docs/android/deployment/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ ms.date: 04/05/2023

> [!div class="op_single_selector"]
>
> - [Publish for Android](index.md)
> - [Publish for iOS](../../ios/deployment/index.md)
> - [Publish for macOS](../../mac-catalyst/deployment/index.md)
> - [Publish for Windows](../../windows/deployment/overview.md)
> - [Publish for Google Play distribution](publish-google-play.md)
> - [Publish for ad-hoc distribution](publish-ad-hoc.md)
> - [Publish using the command line](publish-cli.md)

The final step in the development of a .NET Multi-platform App UI (.NET MAUI) app is to publish it. Publishing is the process of creating a package that contains the app and is ready for users to install on their devices. Publishing involve two essential tasks:

Expand Down
5 changes: 5 additions & 0 deletions docs/android/deployment/publish-ad-hoc.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ ms.date: 05/15/2023

# Publish an Android app for ad-hoc distribution

> [!div class="op_single_selector"]
>
> - [Publish for Google Play distribution](publish-google-play.md)
> - [Publish using the command line](publish-cli.md)

When distributing Android apps outside Google Play, and other marketplaces, *ad-hoc* distribution enables you to make the app available for download on a website or server. Android requires that apps created for ad-hoc distribution use the Android Package (APK) format.

To distribute a .NET Multi-platform App UI (.NET MAUI) Android app, you'll need to sign it with a key from your keystore. Keystores are binary files that serve as repositories of certificates and private keys.
Expand Down
5 changes: 5 additions & 0 deletions docs/android/deployment/publish-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ ms.date: 05/16/2023

# Publish an Android app using the command line

> [!div class="op_single_selector"]
>
> - [Publish for Google Play distribution](publish-google-play.md)
> - [Publish for ad-hoc distribution](publish-ad-hoc.md)

To distribute a .NET Multi-platform App UI (.NET MAUI) Android app, you'll need to sign it with a key from your keystore. A *keystore* is a database of security certificates that's created by using `keytool` from the Java Development Kit (JDK). A keystore is required when publishing a .NET MAUI Android app, as Android won't run apps that haven't been signed.

## Create a keystore file
Expand Down
5 changes: 5 additions & 0 deletions docs/android/deployment/publish-google-play.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ ms.date: 05/15/2023

# Publish an Android app for Google Play distribution

> [!div class="op_single_selector"]
>
> - [Publish for ad-hoc distribution](publish-ad-hoc.md)
> - [Publish using the command line](publish-cli.md)

The most common approach to distributing Android apps to users is through the Google Play. The first time an app is submitted to Google Play it must be submitted through the Google Play Console. Subsequent versions of the app can be submitted through Visual Studio. In both cases, a Google Play Developer account is required. Apps submitted to Google Play require approval from Google.

To distribute a .NET Multi-platform App UI (.NET MAUI) Android app, you'll need to sign it with a key from your keystore, prior to upload to Google Play. Keystores are binary files that serve as repositories of certificates and private keys.
Expand Down
8 changes: 4 additions & 4 deletions docs/ios/deployment/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ ms.date: 02/24/2023

> [!div class="op_single_selector"]
>
> - [Publish for Android](../../android/deployment/index.md)
> - [Publish for iOS](index.md)
> - [Publish for macOS](../../mac-catalyst/deployment/index.md)
> - [Publish for Windows](../../windows/deployment/overview.md)
> - [Publish for app store distribution](publish-app-store.md)
> - [Publish for in-house distribution](publish-in-house.md)
> - [Publish for ad-hoc distribution](publish-ad-hoc.md)
> - [Publish using the command line](publish-cli.md)

Once a .NET Multi-platform App UI (.NET MAUI) iOS app has been developed and tested, it can be packaged for distribution as an *.ipa* file. An *.ipa* file is an iOS app archive file that stores an iOS app. The following diagram shows the steps required to produce the app package for distribution:

Expand Down
6 changes: 6 additions & 0 deletions docs/ios/deployment/publish-ad-hoc.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ ms.date: 02/24/2023

# Publish an iOS app for ad-hoc distribution

> [!div class="op_single_selector"]
>
> - [Publish for app store distribution](publish-app-store.md)
> - [Publish for in-house distribution](publish-in-house.md)
> - [Publish using the command line](publish-cli.md)

Ad-hoc distribution is primarily used for testing apps within a wide group of people, and is available for the Apple Developer Program and the Apple Developer Enterprise Program. Another use case for ad-hoc distribution is distribution within a company when App Store Connect isn't an option.

Ad-hoc distribution has the advantage of not requiring App Store approval, with apps being installed with [Apple Configurator](https://apps.apple.com/app/id1037126344). However, it's limited to 100 devices per membership year, for both development and distribution, and the devices must be added to your Apple Developer Account.
Expand Down
6 changes: 6 additions & 0 deletions docs/ios/deployment/publish-app-store.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ ms.date: 02/24/2023

# Publish an iOS app for App Store distribution

> [!div class="op_single_selector"]
>
> - [Publish for in-house distribution](publish-in-house.md)
> - [Publish for ad-hoc distribution](publish-ad-hoc.md)
> - [Publish using the command line](publish-cli.md)

The most common approach to distributing iOS apps to users is through the App Store. Apps are submitted to the App Store through an online tool called *App Store Connect*. Only developers who belong to the Apple Developer Program have access to this tool. Members of the Apple Developer Enterprise Program do not have access. All apps submitted to the App Store require approval from Apple.

Distributing an iOS app requires that the app is provisioned using a *provisioning profile*. Provisioning profiles are files that contain code signing information, as well as the identity of the app and its intended distribution mechanism.
Expand Down
6 changes: 6 additions & 0 deletions docs/ios/deployment/publish-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ ms.date: 02/24/2023

# Publish an iOS app using the command line

> [!div class="op_single_selector"]
>
> - [Publish for app store distribution](publish-app-store.md)
> - [Publish for in-house distribution](publish-in-house.md)
> - [Publish for ad-hoc distribution](publish-ad-hoc.md)

To publish your app from the command line on a Mac, open a terminal and navigate to the folder for your .NET Multi-platform App UI (.NET MAUI) app project. Run the `dotnet publish` command, providing the following parameters:

| Parameter | Value |
Expand Down
6 changes: 6 additions & 0 deletions docs/ios/deployment/publish-in-house.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ ms.date: 02/24/2023

# Publish an iOS app for in-house distribution

> [!div class="op_single_selector"]
>
> - [Publish for app store distribution](publish-app-store.md)
> - [Publish for ad-hoc distribution](publish-ad-hoc.md)
> - [Publish using the command line](publish-cli.md)

In-house distribution enables members of the Apple Developer Enterprise Program to distribute apps internally to other members of the same organization. This has the advantage of not requiring an App Store review, and having no limit on the number of devices on which an app can be installed. However, members of the Apple Developer Enterprise Program don't have access to App Store Connect, and therefore the licensee is responsible for distributing the app.

Distributing an iOS app requires that the app is provisioned using a *provisioning profile*. Provisioning profiles are files that contain code signing information, as well as the identity of the app and its intended distribution mechanism.
Expand Down
8 changes: 4 additions & 4 deletions docs/mac-catalyst/deployment/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ ms.date: 03/23/2023

> [!div class="op_single_selector"]
>
> - [Publish for Android](../../android/deployment/index.md)
> - [Publish for iOS](../../ios/deployment/index.md
> - [Publish for macOS](index.md)
> - [Publish for Windows](../../windows/deployment/overview.md)
> - [Publish an unsigned app](publish-unsigned.md)
> - [Publish for app store distribution](publish-app-store.md)
> - [Publish outside the app store](publish-outside-app-store.md)
> - [Publish for ad-hoc distribution](publish-ad-hoc.md)

Once a .NET Multi-platform App UI (.NET MAUI) Mac Catalyst app has been developed and tested, it can be packaged for distribution as an *.app* or a *.pkg* file. An *.app* file is a self-contained app that can be run without installation, whereas a *.pkg* is an app packaged in an installer. The following diagram shows the steps required to produce an app package for distribution:

Expand Down
6 changes: 6 additions & 0 deletions docs/mac-catalyst/deployment/publish-ad-hoc.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ ms.date: 03/20/2023

# Publish a Mac Catalyst app for ad-hoc distribution

> [!div class="op_single_selector"]
>
> - [Publish an unsigned app](publish-unsigned.md)
> - [Publish for app store distribution](publish-app-store.md)
> - [Publish outside the app store](publish-outside-app-store.md)

When distributing Mac Catalyst apps outside the Mac App Store, you can also choose to distribute your app to a limited number of users on registered devices. This is known as *ad-hoc* distribution, and is primarily used for testing apps within a group of people. However, it's limited to 100 devices per membership year, and the devices must be added to your Apple Developer Account. Members of the Apple Developer Program and the Apple Developer Enterprise Program can use this distribution approach.

Distributing a Mac Catalyst app requires that the app is provisioned using a *provisioning profile*. Provisioning profiles are files that contain code signing information, as well as the identity of the app and its intended distribution mechanism.
Expand Down
6 changes: 6 additions & 0 deletions docs/mac-catalyst/deployment/publish-app-store.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ ms.date: 03/23/2023

# Publish a Mac Catalyst app for Mac App Store distribution

> [!div class="op_single_selector"]
>
> - [Publish an unsigned app](publish-unsigned.md)
> - [Publish outside the app store](publish-outside-app-store.md)
> - [Publish for ad-hoc distribution](publish-ad-hoc.md)

The most common approach to distributing Mac Catalyst apps to users is through the Mac App Store. Apps are submitted to the Mac App Store through an online tool called *App Store Connect*. Only developers who belong to the Apple Developer Program have access to this tool. Members of the Apple Developer Enterprise Program do not have access. All apps submitted to the Mac App Store require approval from Apple.

Distributing a Mac Catalyst app requires that the app is provisioned using a *provisioning profile*. Provisioning profiles are files that contain code signing information, as well as the identity of the app and its intended distribution mechanism.
Expand Down
6 changes: 6 additions & 0 deletions docs/mac-catalyst/deployment/publish-outside-app-store.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ ms.date: 03/23/2023

# Publish a Mac Catalyst app for distribution outside the Mac App Store

> [!div class="op_single_selector"]
>
> - [Publish an unsigned app](publish-unsigned.md)
> - [Publish for app store distribution](publish-app-store.md)
> - [Publish for ad-hoc distribution](publish-ad-hoc.md)

An alternative to distributing Mac Catalyst apps through the Mac App Store is to distribute them outside the Mac App Store. With this approach, your Mac Catalyst app can be hosted at a location of your choosing for download. Members of the Apple Developer Program and the Apple Developer Enterprise Program can use this distribution approach.

Distributing a Mac Catalyst app requires that the app is provisioned using a *provisioning profile*. Provisioning profiles are files that contain code signing information, as well as the identity of the app and its intended distribution mechanism.
Expand Down
6 changes: 6 additions & 0 deletions docs/mac-catalyst/deployment/publish-unsigned.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ ms.date: 03/23/2023

# Publish an unsigned .NET MAUI Mac Catalyst app

> [!div class="op_single_selector"]
>
> - [Publish for app store distribution](publish-app-store.md)
> - [Publish outside the app store](publish-outside-app-store.md)
> - [Publish for ad-hoc distribution](publish-ad-hoc.md)

To publish an unsigned .NET Multi-platform App UI (.NET MAUI) Mac Catalyst app, open a terminal and navigate to the folder for your app project. Run the `dotnet publish` command, providing the following parameters:

| Parameter | Value |
Expand Down
19 changes: 6 additions & 13 deletions docs/windows/deployment/overview.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
---
title: "Publish a .NET MAUI app for Windows"
description: "Learn how to package and publish a Windows .NET MAUI app."
ms.date: 10/12/2022
ms.date: 11/08/2023
---

# Publish a .NET MAUI app for Windows

> [!div class="op_single_selector"]
>
> - [Publish for Android](../../android/deployment/index.md)
> - [Publish for iOS](../../ios/deployment/index.md)
> - [Publish for macOS](../../mac-catalyst/deployment/index.md)
> - [Publish for Windows](overview.md)
> - [Publish a packaged app using the command line](publish-cli.md)
> - [Publish an unpackaged app using the command line](publish-unpackaged-cli.md)
> - [Publish a packaged app using Visual Studio](publish-visual-studio-folder.md)

When distributing your .NET Multi-platform App UI (.NET MAUI) app for Windows, you can publish the app and its dependencies to a folder for deployment to another system. Publishing a .NET MAUI app for Windows creates an MSIX app package, which has numerous benefits for the users installing your app. For more information about the benefits of MSIX, see [What is MSIX?](/windows/msix/overview).

.NET MAUI currently only allows publishing an MSIX package. You can't yet publish a Windows executable file for distribution.
When distributing your .NET Multi-platform App UI (.NET MAUI) app for Windows, you can publish the app and its dependencies to a folder for deployment to another system. Publishing a .NET MAUI app for Windows involves creating an MSIX app package (known as a *packaged* app), or creating an executable file (known as an *unpackaged* app). For more information about the benefits of MSIX, see [What is MSIX?](/windows/msix/overview).

> [!IMPORTANT]
> Blazor Hybrid apps require a WebView on the host platform. For more information, see [Keep the Web View current in deployed Blazor Hybrid apps](/aspnet/core/blazor/hybrid/security/security-considerations#keep-the-web-view-current-in-deployed-apps).

## Configuration
## MSIX package configuration

The MSIX package is configured by the _Platforms\\Windows\\Package.appxmanifest_ (the manifest) file in your project. The manifest is used by the MSIX installer, the Microsoft store, and by Windows, to configure and display your app. .NET MAUI does use some shared settings across platforms, such as the app name and icon, which is set in the manifest at build-time. Besides those few settings, you'll need to edit the manifest to configure the app package to create a nice installer experience. The Microsoft Store has its own requirements, set in the manifest, when submitting your app.

Expand All @@ -37,7 +34,3 @@ For more information on specific app manifest settings, see [App manifest schema
## Publish your app

.NET MAUI can use Visual Studio for publishing, but also supports publishing through the `dotnet` command-line interface (CLI) for Continuous Integration (CI) scenarios.

<!-- - [Publish an app to the Microsoft Store](publish-visual-studio-store.md)-->
- [Publish to a folder with Visual Studio](publish-visual-studio-folder.md)
- [Publish to a folder with the CLI](publish-cli.md)
18 changes: 7 additions & 11 deletions docs/windows/deployment/publish-cli.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
---
title: "Use the CLI to publish for Windows"
description: "Learn how to package and publish a Windows .NET MAUI app with the dotnet publish command."
title: "Use the CLI to publish packageds app for Windows"
description: "Learn how to package and publish a packaged Windows .NET MAUI app with the dotnet publish command."
ms.date: 10/12/2022
---

# Publish a .NET MAUI app for Windows with the CLI
# Publish a packaged .NET MAUI app for Windows with the CLI

> [!div class="op_single_selector"]
>
> - [Publish for Android](../../android/deployment/publish-cli.md)
> - [Publish for iOS](../../ios/deployment/index.md)
> - [Publish for macOS](../../mac-catalyst/deployment/index.md)
> - [Publish for Windows](publish-cli.md)
> - [Publish an unpackaged app using the command line](publish-unpackaged-cli.md)
> - [Publish a packaged app using Visual Studio](publish-visual-studio-folder.md)

When distributing your .NET Multi-platform App UI (.NET MAUI) app for Windows, you can publish the app and its dependencies to a folder for deployment to another system. You can also package the app into an MSIX package, which has numerous benefits for the users installing your app. For more information about the benefits of MSIX, see [What is MSIX?](/windows/msix/overview)

.NET MAUI currently only allows publishing an MSIX package. You can't yet publish a Windows executable file for distribution.

## Create a signing certificate

You must use a signing certificate for use in publishing your app. This certificate is used to sign the MSIX package. The following steps demonstrate how to create and install a self-signed certificate with PowerShell:
Expand Down Expand Up @@ -105,7 +101,7 @@ Add the following `<PropertyGroup>` node to your project file. This property gro

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=A10612AF095FD8F8255F4C6691D88F79EF2B135E`.

The second `<PropertyGroup>` in the example is required to work around a bug in the Windows SDK. For more information about the bug, see [WindowsAppSDK Issue #2940](https://github.com/microsoft/WindowsAppSDK/issues/2940).
The second `<PropertyGroup>` in the example is required to work around a bug in the Windows SDK. For more information about the bug, see [WindowsAppSDK Issue #3337](https://github.com/microsoft/WindowsAppSDK/issues/3337).

## Publish

Expand All @@ -115,7 +111,7 @@ To publish your app, open the **Developer Command Prompt for VS 2022** terminal
|------------------------------|-------------------------------------------------------------------------------------|
| `-f` | The target framework, which is `net7.0-windows{version}`. This value is a Windows TFM, such as `net7.0-windows10.0.19041.0`. Ensure that this value is identical to the value in the `<TargetFrameworks>` node in your *.csproj* file. |
| `-c` | The build configuration, which is `Release`. |
| `-p:RuntimeIdentifierOverride=win10-x64`<br>- or -<br>`-p:RuntimeIdentifierOverride=win10-x86` | Avoids the bug detailed in [WindowsAppSDK Issue #2940](https://github.com/microsoft/WindowsAppSDK/issues/2940). Choose the `-x64` or `-x86` version of the parameter based on your target platform.
| `-p:RuntimeIdentifierOverride=win10-x64`<br>- or -<br>`-p:RuntimeIdentifierOverride=win10-x86` | Avoids the bug detailed in [WindowsAppSDK Issue #3337](https://github.com/microsoft/WindowsAppSDK/issues/3337). Choose the `-x64` or `-x86` version of the parameter based on your target platform.

> [!WARNING]
> Attempting to publish a .NET MAUI solution will result in the `dotnet publish` command attempting to publish each project in the solution individually, which can cause issues when you've added other project types to your solution. Therefore, the `dotnet publish` command should be scoped to your .NET MAUI app project.
Expand Down
Loading