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
2 changes: 2 additions & 0 deletions docs/android/deployment/publish-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ Run the `dotnet publish` command with the following parameters to build and sign
dotnet publish -f net8.0-android -c Release -p:AndroidKeyStore=true -p:AndroidSigningKeyStore={filename}.keystore -p:AndroidSigningKeyAlias={keyname} -p:AndroidSigningKeyPass={password} -p:AndroidSigningStorePass={password}
```

[!INCLUDE [dotnet publish in .NET 8](~/includes/dotnet-publish-net8.md)]

For example, use the following command to build and sign your app using the previously created keystore:

```console
Expand Down
7 changes: 7 additions & 0 deletions docs/includes/dotnet-publish-net8.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
ms.topic: include
ms.date: 11/13/2023
---

> [!NOTE]
> In .NET 8, the `dotnet publish` command defaults to the `Release` configuration. Therefore, the build configuration can be omitted from the command line.
2 changes: 2 additions & 0 deletions docs/ios/deployment/publish-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ For example, use the following command to build and sign an *.ipa* on a Mac:
dotnet publish -f net8.0-ios -c Release -p:ArchiveOnBuild=true -p:RuntimeIdentifier=ios-arm64 -p:CodesignKey="Apple Distribution: John Smith (AY2GDE9QM7)" -p:CodesignProvision="MyMauiApp"
```

[!INCLUDE [dotnet publish in .NET 8](~/includes/dotnet-publish-net8.md)]

Publishing builds and signs the app, and then copies the *.ipa* to the *bin/Release/net8.0-ios/ios-arm64/publish/* folder. The distribution channel for the app is specified in the distribution certificate contained within the provisioning profile. For information about creating provisioning profiles for the different distribution channels, see [Publish an iOS app for App Store distribution](publish-app-store.md), [Publish an iOS app for ad-hoc distribution](publish-ad-hoc.md), and [Publish an iOS app for in-house distribution](publish-in-house.md).

For more information about the `dotnet publish` command, see [dotnet publish](/dotnet/core/tools/dotnet-publish).
Expand Down
2 changes: 2 additions & 0 deletions docs/mac-catalyst/deployment/publish-ad-hoc.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ For example, use the following command to build and sign a *.pkg* on a Mac, for
dotnet publish -f net8.0-maccatalyst -c Release -p:MtouchLink=SdkOnly -p:CreatePackage=true -p:EnableCodeSigning=true -p:CodesignKey="Apple Development: John Smith (AY2GDE9QM7)" -p:CodesignProvision="MyMauiApp (Ad-hoc)" -p:CodesignEntitlements="Platforms\MacCatalyst\Entitlements.plist" -p:UseHardenedRuntime=true
```

[!INCLUDE [dotnet publish in .NET 8](~/includes/dotnet-publish-net8.md)]

Publishing builds, signs, and packages the app, and then copies the *.pkg* to the *bin/Release/net8.0-maccatalyst/publish/* folder. If you publish the app using only a single architecture, it will be published to the *bin/Release/net8.0-maccatalyst/{architecture}/publish/* folder.

During the signing process it maybe necessary to enter your login password and allow `codesign` to run:
Expand Down
2 changes: 2 additions & 0 deletions docs/mac-catalyst/deployment/publish-app-store.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@ For example, use the following command to build and sign a *.pkg* on a Mac, for
dotnet publish -f net8.0-maccatalyst -c Release -p:MtouchLink=SdkOnly -p:CreatePackage=true -p:EnableCodeSigning=true -p:EnablePackageSigning=true -p:CodesignKey="Apple Distribution: John Smith (AY2GDE9QM7)" -p:CodesignProvision="MyMauiApp" -p:CodesignEntitlements="Platforms\MacCatalyst\Entitlements.plist" -p:PackageSigningKey="3rd Party Mac Developer Installer: John Smith (AY2GDE9QM7)"
```

[!INCLUDE [dotnet publish in .NET 8](~/includes/dotnet-publish-net8.md)]

[!INCLUDE [Publishing output](../includes/publishing-output.md)]

## Define build properties in your project file
Expand Down
2 changes: 2 additions & 0 deletions docs/mac-catalyst/deployment/publish-outside-app-store.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,8 @@ For example, use the following command to build and sign a *.pkg* on a Mac, for
dotnet publish -f net8.0-maccatalyst -c Release -p:MtouchLink=SdkOnly -p:CreatePackage=true -p:EnableCodeSigning=true -p:EnablePackageSigning=true -p:CodesignKey="Developer ID Application: John Smith (AY2GDE9QM7)" -p:CodesignProvision="MyMauiApp (Non-App Store)" -p:CodesignEntitlements="Platforms\MacCatalyst\Entitlements.plist" -p:PackageSigningKey="Developer ID Installer: John Smith (AY2GDE9QM7)" -p:UseHardenedRuntime=true
```

[!INCLUDE [dotnet publish in .NET 8](~/includes/dotnet-publish-net8.md)]

[!INCLUDE [Publishing output](../includes/publishing-output.md)]

## Define build properties in your project file
Expand Down
2 changes: 2 additions & 0 deletions docs/mac-catalyst/deployment/publish-unsigned.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ For example, use the following command to create an *.app*:
dotnet publish -f net8.0-maccatalyst -c Release -p:CreatePackage=false
```

[!INCLUDE [dotnet publish in .NET 8](~/includes/dotnet-publish-net8.md)]

Use the following command to create a *.pkg*:

```dotnetcli
Expand Down
2 changes: 2 additions & 0 deletions docs/mac-catalyst/includes/publishing-property-group.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ After adding the above property group, the app can be published from the command
dotnet build -f net8.0-maccatalyst -c Release
```

[!INCLUDE [dotnet publish in .NET 8](~/includes/dotnet-publish-net8.md)]

Publishing builds, signs, and packages the app, and then copies the *.pkg* to the *bin/Release/net8.0-maccatalyst/publish/* folder.
2 changes: 2 additions & 0 deletions docs/windows/deployment/publish-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ For example:
dotnet publish -f net8.0-windows10.0.19041.0 -c Release -p:RuntimeIdentifierOverride=win10-x64
```

[!INCLUDE [dotnet publish in .NET 8](~/includes/dotnet-publish-net8.md)]

Publishing builds and packages the app, copying the signed package to the _bin\\Release\\net8.0-windows10.0.19041.0\\win10-x64\\AppPackages\\\<appname>\\_ folder. \<appname> is a folder named after both your project and version. In this folder, there's an _msix_ file, and that's the app package.

For more information about the `dotnet publish` command, see [dotnet publish](/dotnet/core/tools/dotnet-publish).
Expand Down
2 changes: 2 additions & 0 deletions docs/windows/deployment/publish-unpackaged-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ For example:
dotnet publish -f net8.0-windows10.0.19041.0 -c Release -p:RuntimeIdentifierOverride=win10-x64 -p:WindowsPackageType=None
```

[!INCLUDE [dotnet publish in .NET 8](~/includes/dotnet-publish-net8.md)]

Publishing builds the app, copying the executable to the _bin\\Release\\net8.0-windows10.0.19041.0\\win10-x64\\publish_ folder. In this folder, there's an _exe_ file, and that's the built app. This app can be launched or the entire folder can be copied to another machine and launched there.

An important distinction from a packaged app is that this won't include the .NET runtime in the folder. This means that the app will require the .NET runtime to first be installed on the machines that will eventually run the app. To ensure the app also contains all the runtime components, the `-p:WindowsAppSDKSelfContained` argument can be provided when publishing. For example:
Expand Down