diff --git a/docs/android/deployment/publish-cli.md b/docs/android/deployment/publish-cli.md index 94114c3601..701a1a1583 100644 --- a/docs/android/deployment/publish-cli.md +++ b/docs/android/deployment/publish-cli.md @@ -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 diff --git a/docs/includes/dotnet-publish-net8.md b/docs/includes/dotnet-publish-net8.md new file mode 100644 index 0000000000..0d275140dd --- /dev/null +++ b/docs/includes/dotnet-publish-net8.md @@ -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. diff --git a/docs/ios/deployment/publish-cli.md b/docs/ios/deployment/publish-cli.md index ca17f4582c..9e96b1f389 100644 --- a/docs/ios/deployment/publish-cli.md +++ b/docs/ios/deployment/publish-cli.md @@ -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). diff --git a/docs/mac-catalyst/deployment/publish-ad-hoc.md b/docs/mac-catalyst/deployment/publish-ad-hoc.md index 0f9aacf806..8b8ab8674e 100644 --- a/docs/mac-catalyst/deployment/publish-ad-hoc.md +++ b/docs/mac-catalyst/deployment/publish-ad-hoc.md @@ -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: diff --git a/docs/mac-catalyst/deployment/publish-app-store.md b/docs/mac-catalyst/deployment/publish-app-store.md index 4c69069f4d..118c3534d2 100644 --- a/docs/mac-catalyst/deployment/publish-app-store.md +++ b/docs/mac-catalyst/deployment/publish-app-store.md @@ -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 diff --git a/docs/mac-catalyst/deployment/publish-outside-app-store.md b/docs/mac-catalyst/deployment/publish-outside-app-store.md index 64c6449a24..58bb9df166 100644 --- a/docs/mac-catalyst/deployment/publish-outside-app-store.md +++ b/docs/mac-catalyst/deployment/publish-outside-app-store.md @@ -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 diff --git a/docs/mac-catalyst/deployment/publish-unsigned.md b/docs/mac-catalyst/deployment/publish-unsigned.md index ac76320188..a78be89e77 100644 --- a/docs/mac-catalyst/deployment/publish-unsigned.md +++ b/docs/mac-catalyst/deployment/publish-unsigned.md @@ -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 diff --git a/docs/mac-catalyst/includes/publishing-property-group.md b/docs/mac-catalyst/includes/publishing-property-group.md index 84aa0f1bc8..55b74969da 100644 --- a/docs/mac-catalyst/includes/publishing-property-group.md +++ b/docs/mac-catalyst/includes/publishing-property-group.md @@ -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. diff --git a/docs/windows/deployment/publish-cli.md b/docs/windows/deployment/publish-cli.md index b270ae9b75..80c5c4ca5c 100644 --- a/docs/windows/deployment/publish-cli.md +++ b/docs/windows/deployment/publish-cli.md @@ -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\\\\\_ folder. \ 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). diff --git a/docs/windows/deployment/publish-unpackaged-cli.md b/docs/windows/deployment/publish-unpackaged-cli.md index 7580c181aa..1ef8be5be6 100644 --- a/docs/windows/deployment/publish-unpackaged-cli.md +++ b/docs/windows/deployment/publish-unpackaged-cli.md @@ -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: