diff --git a/docs/android/deployment/publish-cli.md b/docs/android/deployment/publish-cli.md index 9d93ed7e3d..94114c3601 100644 --- a/docs/android/deployment/publish-cli.md +++ b/docs/android/deployment/publish-cli.md @@ -64,7 +64,7 @@ To build your app from the command line, and sign it using your keystore, open a | Parameter | Value | |------------------------------|-------------------------------------------------------------------------------------------------| -| `-f` or `--framework` | The target framework, which is `net7.0-android`. | +| `-f` or `--framework` | The target framework, which is `net8.0-android`. | | `-c` or `--configuration` | The build configuration, which is `Release`. | > [!WARNING] @@ -96,19 +96,19 @@ For a full list of build properties, see [Build properties](/xamarin/android/dep Run the `dotnet publish` command with the following parameters to build and sign your app: ```console -dotnet publish -f net7.0-android -c Release -p:AndroidKeyStore=true -p:AndroidSigningKeyStore={filename}.keystore -p:AndroidSigningKeyAlias={keyname} -p:AndroidSigningKeyPass={password} -p:AndroidSigningStorePass={password} +dotnet publish -f net8.0-android -c Release -p:AndroidKeyStore=true -p:AndroidSigningKeyStore={filename}.keystore -p:AndroidSigningKeyAlias={keyname} -p:AndroidSigningKeyPass={password} -p:AndroidSigningStorePass={password} ``` For example, use the following command to build and sign your app using the previously created keystore: ```console -dotnet publish -f net7.0-android -c Release -p:AndroidKeyStore=true -p:AndroidSigningKeyStore=myapp.keystore -p:AndroidSigningKeyAlias=myapp -p:AndroidSigningKeyPass=mypassword -p:AndroidSigningStorePass=mypassword +dotnet publish -f net8.0-android -c Release -p:AndroidKeyStore=true -p:AndroidSigningKeyStore=myapp.keystore -p:AndroidSigningKeyAlias=myapp -p:AndroidSigningKeyPass=mypassword -p:AndroidSigningStorePass=mypassword ``` Both the `AndroidSigningKeyPass` and `AndroidSigningStorePass` properties support `env:` and `file:` prefixes that can be used to specify an environment variable or file that contains the password. Specifying the password in this way prevents it from appearing in build logs. For example, to use an environment variable named `AndroidSigningPassword`: ```console -dotnet publish -f net7.0-android -c Release -p:AndroidKeyStore=true -p:AndroidSigningKeyStore=myapp.keystore -p:AndroidSigningKeyAlias=myapp -p:AndroidSigningKeyPass=env:AndroidSigningPassword -p:AndroidSigningStorePass=env:AndroidSigningPassword +dotnet publish -f net8.0-android -c Release -p:AndroidKeyStore=true -p:AndroidSigningKeyStore=myapp.keystore -p:AndroidSigningKeyAlias=myapp -p:AndroidSigningKeyPass=env:AndroidSigningPassword -p:AndroidSigningStorePass=env:AndroidSigningPassword ``` > [!IMPORTANT] @@ -117,10 +117,10 @@ dotnet publish -f net7.0-android -c Release -p:AndroidKeyStore=true -p:AndroidSi To use a file located at *C:\Users\user1\AndroidSigningPassword.txt*: ```console -dotnet publish -f net7.0-android -c Release -p:AndroidKeyStore=true -p:AndroidSigningKeyStore=myapp.keystore -p:AndroidSigningKeyAlias=myapp -p:AndroidSigningKeyPass=file:C:\Users\user1\AndroidSigningPassword.txt -p:AndroidSigningStorePass=file:C:\Users\user1\AndroidSigningPassword.txt +dotnet publish -f net8.0-android -c Release -p:AndroidKeyStore=true -p:AndroidSigningKeyStore=myapp.keystore -p:AndroidSigningKeyAlias=myapp -p:AndroidSigningKeyPass=file:C:\Users\user1\AndroidSigningPassword.txt -p:AndroidSigningStorePass=file:C:\Users\user1\AndroidSigningPassword.txt ``` -Publishing builds and signs the app, and then copies the AAB and APK files to the *bin\\Release\\net7.0-android\\publish* folder. There are two AAB files - one unsigned and another signed. The signed variant has **-signed** in the file name. +Publishing builds and signs the app, and then copies the AAB and APK files to the *bin\\Release\\net8.0-android\\publish* folder. There are two AAB files - one unsigned and another signed. The signed variant has **-signed** in the file name. For more information about the `dotnet publish` command, see [dotnet publish](/dotnet/core/tools/dotnet-publish). diff --git a/docs/android/manifest.md b/docs/android/manifest.md index 21fbc2d696..0ea443b53e 100644 --- a/docs/android/manifest.md +++ b/docs/android/manifest.md @@ -8,7 +8,7 @@ ms.date: 03/07/2023 Every .NET Multi-platform App UI (.NET MAUI) app on Android has an *AndroidManifest.xml* file, located in the *Platforms\\Android* folder, that describes essential information about your app to build tools, the Android operating system, and Google Play. -The manifest file for your .NET MAUI Android app is generated as part of the .NET MAUI build process on Android. This build process takes the XML in the *Platforms\\Android\\AndroidManifest.xml* file, and merges it with any XML that's generated from specific attributes on your classes. The resulting manifest file can be found in the *obj* folder. For example, it can be found at *obj\\Debug\\net7.0-android\\AndroidManifest.xml* for debug builds on .NET 7. +The manifest file for your .NET MAUI Android app is generated as part of the .NET MAUI build process on Android. This build process takes the XML in the *Platforms\\Android\\AndroidManifest.xml* file, and merges it with any XML that's generated from specific attributes on your classes. The resulting manifest file can be found in the *obj* folder. For example, it can be found at *obj\\Debug\\net8.0-android\\AndroidManifest.xml* for debug builds on .NET 8. -06. In the Visual Studio toolbar, use the **Debug Target** drop-down to select **Framework** and then the **net7.0-windows** entry: +06. In the Visual Studio toolbar, use the **Debug Target** drop-down to select **Framework** and then the **net8.0-windows** entry: :::image type="content" source="media/first-app/vs/windows-debug-target.png" alt-text="Select the Windows Machine debugging target for .NET MAUI."::: diff --git a/docs/get-started/installation.md b/docs/get-started/installation.md index 510eb93b2d..69c6c0fdae 100644 --- a/docs/get-started/installation.md +++ b/docs/get-started/installation.md @@ -126,7 +126,7 @@ If you don't want to install Visual Studio, you can still get set up for .NET MA 1. If you'd like to debug Android in Visual Studio Code, you also have to: 1. Install [Microsoft OpenJDK 11](/java/openjdk/download#openjdk-11). 1. Install the Android SDK. You can acquire the correct versions of the Android SDK and build tools by creating a new .NET MAUI project (`dotnet new maui`) and running the following command in your terminal: - `dotnet build -t:InstallAndroidDependencies -f:net7.0-android -p:AndroidSdkDirectory="" -p:AcceptAndroidSDKLicenses=True` + `dotnet build -t:InstallAndroidDependencies -f:net8.0-android -p:AndroidSdkDirectory="" -p:AcceptAndroidSDKLicenses=True` On Windows, the suggested Android SDK directory value is `%LOCALAPPDATA%/Android/Sdk`. > [!NOTE] @@ -141,7 +141,7 @@ If you don't want to install Visual Studio, you can still get set up for .NET MA 1. If you'd like to debug to Android in Visual Studio Code, you also have to: 1. Install [Microsoft OpenJDK 11](/java/openjdk/download#openjdk-11). 1. Install the Android SDK. You can acquire the correct versions of the Android SDK and build tools by creating a new .NET MAUI project (`dotnet new maui`) and running the following command in your terminal: - `dotnet build -t:InstallAndroidDependencies -f:net7.0-android -p:AndroidSdkDirectory="" -p:AcceptAndroidSDKLicenses=True` + `dotnet build -t:InstallAndroidDependencies -f:net8.0-android -p:AndroidSdkDirectory="" -p:AcceptAndroidSDKLicenses=True` On macOS, the suggested Android SDK directory value is `$HOME/Library/Android/sdk`. ### Linux @@ -210,7 +210,7 @@ This is a known issue if you install to `%APPDATA%` on Windows and will be fixed ### Debugging issues * Debugging can fail to start for multiple reasons. If there isn't a clear error in the Output window, first double check that you are using the ".NET MAUI" run configuration in Visual Studio Code. -* You can try a command line build from the terminal to see if the error is with your code or the .NET MAUI extension. For example, you could run `dotnet build -f:net7.0-android` to see if your Android build succeeds outside of Visual Studio Code. If this build succeeds, please [Report an Issue](https://github.com/microsoft/vscode-dotnettools/issues) +* You can try a command line build from the terminal to see if the error is with your code or the .NET MAUI extension. For example, you could run `dotnet build -f:net8.0-android` to see if your Android build succeeds outside of Visual Studio Code. If this build succeeds, please [Report an Issue](https://github.com/microsoft/vscode-dotnettools/issues) ## Known Limitations diff --git a/docs/ios/cli.md b/docs/ios/cli.md index 58994f0315..08e84eb1db 100644 --- a/docs/ios/cli.md +++ b/docs/ios/cli.md @@ -16,7 +16,7 @@ In this tutorial, you'll learn how to create and run a .NET Multi-platform App U ```zsh cd MyMauiApp - dotnet build -t:Run -f net7.0-ios + dotnet build -t:Run -f net8.0-ios ``` The `dotnet build` command will restore the project the dependencies, build the app, and launch it in the default simulator. @@ -49,13 +49,13 @@ A .NET MAUI iOS app can be launched on a specific iOS simulator from a Mac by pr 3. In **Terminal**, build the app and run it on your chosen simulator by specifying the `_DeviceName` MSBuild property using the `-p` [MSBuild option](/dotnet/core/tools/dotnet-build#msbuild): ```zsh - dotnet build -t:Run -f net7.0-ios -p:_DeviceName=:v2:udid=MY_SPECIFIC_UDID + dotnet build -t:Run -f net8.0-ios -p:_DeviceName=:v2:udid=MY_SPECIFIC_UDID ``` For example, use the following command to build the app and run it on the iPhone 13 Pro simulator: ```zsh - dotnet build -t:Run -f net7.0-ios -p:_DeviceName=:v2:udid=E25BBE37-69BA-4720-B6FD-D54C97791E79 + dotnet build -t:Run -f net8.0-ios -p:_DeviceName=:v2:udid=E25BBE37-69BA-4720-B6FD-D54C97791E79 ``` 4. In your chosen simulator, press the **Click me** button several times and observe that the count of the number of button clicks is incremented. @@ -81,7 +81,7 @@ A device must be provisioned before you can deploy an iOS app to it. For more in 5. In **Terminal**, build the app and run it on your chosen simulator by specifying the `_DeviceName` MSBuild property using the `-p` [MSBuild option](/dotnet/core/tools/dotnet-build#msbuild): ```zsh - dotnet build -t:Run -f net7.0-ios -p:RuntimeIdentifier=ios-arm64 -p:_DeviceName=MY_SPECIFIC_UDID + dotnet build -t:Run -f net8.0-ios -p:RuntimeIdentifier=ios-arm64 -p:_DeviceName=MY_SPECIFIC_UDID ``` Replace "MY_SPECIFIC_UDID" with the device identifier you copied to the clipboard. diff --git a/docs/ios/deployment/publish-cli.md b/docs/ios/deployment/publish-cli.md index b13cbdc76b..ca17f4582c 100644 --- a/docs/ios/deployment/publish-cli.md +++ b/docs/ios/deployment/publish-cli.md @@ -16,7 +16,7 @@ To publish your app from the command line on a Mac, open a terminal and navigate | Parameter | Value | |------------------------------|-------------------------------------------------------------------------------------------------| -| `-f` or `--framework` | The target framework, which is `net7.0-ios`. | +| `-f` or `--framework` | The target framework, which is `net8.0-ios`. | | `-c` or `--configuration` | The build configuration, which is `Release`. | > [!WARNING] @@ -44,10 +44,10 @@ For a full list of build properties, see [Project file properties](https://githu For example, use the following command to build and sign an *.ipa* on a Mac: ```dotnetcli -dotnet publish -f net7.0-ios -c Release -p:ArchiveOnBuild=true -p:RuntimeIdentifier=ios-arm64 -p:CodesignKey="Apple Distribution: John Smith (AY2GDE9QM7)" -p:CodesignProvision="MyMauiApp" +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" ``` -Publishing builds and signs the app, and then copies the *.ipa* to the *bin/Release/net7.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). +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). @@ -60,7 +60,7 @@ If the `RuntimeIdentifier` parameter isn't specified on the command line, or in One solution to these issues is to add the following `` to your project file: ```xml - + ios-arm64 ``` @@ -68,13 +68,13 @@ One solution to these issues is to add the following `` to your p Then, use the following command to publish your app: ```dotnetcli -dotnet publish -f net7.0-ios -p:IsPublishing=true ... +dotnet publish -f net8.0-ios -p:IsPublishing=true ... ``` An alternative solution to these issues is to add the following `` to your project file: ```xml - + ios-arm64 ``` @@ -82,7 +82,7 @@ An alternative solution to these issues is to add the following ` Then, use the following command to publish your app: ```dotnetcli -dotnet publish -f net7.0-ios -c Release ... +dotnet publish -f net8.0-ios -c Release ... ``` ## Define build properties in your project file @@ -147,13 +147,13 @@ To publish your app from the command line on Windows, open a terminal and naviga For example, use the following command to build and sign an *.ipa* from Windows: ```dotnetcli -dotnet publish -f net7.0-ios -c Release -p:ArchiveOnBuild=true -p:RuntimeIdentifier=ios-arm64 -p:CodesignKey="Apple Distribution: John Smith (AY2GDE9QM7)" -p:CodesignProvision="MyMauiApp" -p:ServerAddress={macOS build host IP address} -p:ServerUser={macOS username} -p:ServerPassword={macOS password} -p:TcpPort=58181 -p:_DotNetRootRemoteDirectory=/Users/{macOS username}/Library/Caches/Xamarin/XMA/SDKs/dotnet/ +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" -p:ServerAddress={macOS build host IP address} -p:ServerUser={macOS username} -p:ServerPassword={macOS password} -p:TcpPort=58181 -p:_DotNetRootRemoteDirectory=/Users/{macOS username}/Library/Caches/Xamarin/XMA/SDKs/dotnet/ ``` > [!NOTE] > If the `ServerPassword` parameter is omitted from a command line build invocation, Pair to Mac attempts to log in to the Mac build host using its saved SSH keys. -Publishing builds and signs the app, and then copies the *.ipa* to the *bin\\Release\\net7.0-ios\\ios-arm64\\publish* folder on your Windows machine. The distribution channel for the app is specified in the distribution certificate contained within the provisioning profile. For information about creating distribution 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) +Publishing builds and signs the app, and then copies the *.ipa* to the *bin\\Release\\net8.0-ios\\ios-arm64\\publish* folder on your Windows machine. The distribution channel for the app is specified in the distribution certificate contained within the provisioning profile. For information about creating distribution 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) During the publishing process it maybe necessary to allow `codesign` to run on your paired Mac: diff --git a/docs/ios/pair-to-mac.md b/docs/ios/pair-to-mac.md index b94d402657..4ed68d428a 100644 --- a/docs/ios/pair-to-mac.md +++ b/docs/ios/pair-to-mac.md @@ -154,7 +154,7 @@ If you encounter any trouble using automatic Mac provisioning, take a look at th Pair to Mac supports building .NET MAUI apps from the command line. Navigate to the folder that holds the source of your .NET MAUI iOS app and execute the following command: ```dotnet -dotnet build -f net7.0-ios -p:ServerAddress={macOS build host IP address} -p:ServerUser={macOS username} -p:ServerPassword={macOS password} -p:TcpPort=58181 -p:_DotNetRootRemoteDirectory=/Users/{macOS username}/Library/Caches/Xamarin/XMA/SDKs/dotnet/ +dotnet build -f net8.0-ios -p:ServerAddress={macOS build host IP address} -p:ServerUser={macOS username} -p:ServerPassword={macOS password} -p:TcpPort=58181 -p:_DotNetRootRemoteDirectory=/Users/{macOS username}/Library/Caches/Xamarin/XMA/SDKs/dotnet/ ``` The parameters passed to `dotnet` in the above example are: diff --git a/docs/mac-catalyst/capabilities.md b/docs/mac-catalyst/capabilities.md index 0630bbdaa4..1c81a8ddea 100644 --- a/docs/mac-catalyst/capabilities.md +++ b/docs/mac-catalyst/capabilities.md @@ -66,7 +66,7 @@ The project file for your app should be updated to use the signing certificate, The following example shows a typical property group for building and signing your Mac Catalyst app for Mac App Store distribution: ```xml - + True Apple Distribution: John Smith (AY2GDE9QM7) MyMauiApp diff --git a/docs/mac-catalyst/cli.md b/docs/mac-catalyst/cli.md index cdf095885b..bcd2e44398 100644 --- a/docs/mac-catalyst/cli.md +++ b/docs/mac-catalyst/cli.md @@ -16,7 +16,7 @@ In this tutorial, you'll learn how to create and run a .NET Multi-platform App U ```zsh cd MyMauiApp - dotnet build -t:Run -f net7.0-maccatalyst + dotnet build -t:Run -f net8.0-maccatalyst ``` The `dotnet build` command will restore the project dependencies, build the app, and launch it. diff --git a/docs/mac-catalyst/deployment/publish-ad-hoc.md b/docs/mac-catalyst/deployment/publish-ad-hoc.md index 30f7023c2e..0f9aacf806 100644 --- a/docs/mac-catalyst/deployment/publish-ad-hoc.md +++ b/docs/mac-catalyst/deployment/publish-ad-hoc.md @@ -159,7 +159,7 @@ To publish your Mac Catalyst app from the command line on a Mac, open a terminal | Parameter | Value | |------------------------------|-------------------------------------------------------------------------------------------------| -| `-f` or `--framework` | The target framework, which is `net7.0-maccatalyst`. | +| `-f` or `--framework` | The target framework, which is `net8.0-maccatalyst`. | | `-c` or `--configuration` | The build configuration, which is `Release`. | | `-p:MtouchLink` | The link mode for the project, which can be `None`, `SdkOnly`, or `Full`. | | `-p:CreatePackage` | Set to `true` so that a package (*.pkg*) is created for the app at the end of the build. | @@ -174,10 +174,10 @@ To publish your Mac Catalyst app from the command line on a Mac, open a terminal For example, use the following command to build and sign a *.pkg* on a Mac, for ad-hoc distribution to users on registered devices: ```dotnetcli -dotnet publish -f net7.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 +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 ``` -Publishing builds, signs, and packages the app, and then copies the *.pkg* to the *bin/Release/net7.0-maccatalyst/publish/* folder. If you publish the app using only a single architecture, it will be published to the *bin/Release/net7.0-maccatalyst/{architecture}/publish/* folder. +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: @@ -214,7 +214,7 @@ For a full list of build properties, see [Project file properties](https://githu The following example shows a typical property group for building and signing your Mac Catalyst app for ad-hoc distribution to users on registered devices: ```xml - + SdkOnly True true @@ -228,7 +228,7 @@ The following example shows a typical property group for building and signing yo This example `` adds a condition check, preventing the settings from being processed unless the condition check passes. The condition check looks for two items: 1. The build configuration is set to `Release`. -1. The target framework is set to something containing the text `net7.0-maccatalyst`. +1. The target framework is set to something containing the text `net8.0-maccatalyst`. 1. The platform is set to `AnyCPU`. If any of these conditions fail, the settings aren't processed. More importantly, the `` and `` settings aren't set, preventing the app from being signed. @@ -236,10 +236,10 @@ If any of these conditions fail, the settings aren't processed. More importantly After adding the above property group, the app can be published from the command line on a Mac by opening a terminal and navigating to the folder for your .NET MAUI app project. Then, run the following command: ```dotnetcli -dotnet build -f net7.0-maccatalyst -c Release +dotnet build -f net8.0-maccatalyst -c Release ``` -Publishing builds, signs, and packages the app, and then copies the *.pkg* to the *bin/Release/net7.0-maccatalyst/publish/* folder. +Publishing builds, signs, and packages the app, and then copies the *.pkg* to the *bin/Release/net8.0-maccatalyst/publish/* folder. ## Distribute your app for testing diff --git a/docs/mac-catalyst/deployment/publish-app-store.md b/docs/mac-catalyst/deployment/publish-app-store.md index 0130707b11..4c69069f4d 100644 --- a/docs/mac-catalyst/deployment/publish-app-store.md +++ b/docs/mac-catalyst/deployment/publish-app-store.md @@ -178,7 +178,7 @@ To publish your Mac Catalyst app from the command line on a Mac, open a terminal | Parameter | Value | |------------------------------|-------------------------------------------------------------------------------------------------| -| `-f` or `--framework` | The target framework, which is `net7.0-maccatalyst`. | +| `-f` or `--framework` | The target framework, which is `net8.0-maccatalyst`. | | `-c` or `--configuration` | The build configuration, which is `Release`. | | `-p:MtouchLink` | The link mode for the project, which can be `None`, `SdkOnly`, or `Full`. | | `-p:CreatePackage` | Set to `true` so that a package (*.pkg*) is created for the app at the end of the build. | @@ -209,7 +209,7 @@ For a full list of build properties, see [Project file properties](https://githu For example, use the following command to build and sign a *.pkg* on a Mac, for distribution through the Mac App Store: ```dotnetcli -dotnet publish -f net7.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)" +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 [Publishing output](../includes/publishing-output.md)] @@ -241,7 +241,7 @@ For a full list of build properties, see [Project file properties](https://githu The following example shows a typical property group for building and signing your Mac Catalyst app for Mac App Store distribution: ```xml - + SdkOnly True true diff --git a/docs/mac-catalyst/deployment/publish-outside-app-store.md b/docs/mac-catalyst/deployment/publish-outside-app-store.md index 4576fff069..64c6449a24 100644 --- a/docs/mac-catalyst/deployment/publish-outside-app-store.md +++ b/docs/mac-catalyst/deployment/publish-outside-app-store.md @@ -174,7 +174,7 @@ If your app uses encryption, and you plan to distribute it outside the United St Currently, when you attempt to publish a .NET MAUI Mac Catalyst app for distribution outside the Mac App Store, provided you've met the provisioning requirements, you'll receive an error about `codesign` exiting with code 3: ``` -/usr/local/share/dotnet/packs/Microsoft.MacCatalyst.Sdk/16.2.1040/tools/msbuild/iOS/Xamarin.Shared.targets(1930,3): error MSB6006: "codesign" exited with code 3. [/Users/davidbritch/Projects/MyMauiApp/MyMauiApp/MyMauiApp.csproj::TargetFramework=net7.0-maccatalyst] +/usr/local/share/dotnet/packs/Microsoft.MacCatalyst.Sdk/16.2.1040/tools/msbuild/iOS/Xamarin.Shared.targets(1930,3): error MSB6006: "codesign" exited with code 3. [/Users/davidbritch/Projects/MyMauiApp/MyMauiApp/MyMauiApp.csproj::TargetFramework=net8.0-maccatalyst] ``` While `codesign` succeeds in signing your app, the `_CodesignVerify` target fails to verify the code signature: @@ -204,7 +204,7 @@ To publish your Mac Catalyst app from the command line on a Mac, open a terminal | Parameter | Value | |------------------------------|-------------------------------------------------------------------------------------------------| -| `-f` or `--framework` | The target framework, which is `net7.0-maccatalyst`. | +| `-f` or `--framework` | The target framework, which is `net8.0-maccatalyst`. | | `-c` or `--configuration` | The build configuration, which is `Release`. | | `-p:MtouchLink` | The link mode for the project, which can be `None`, `SdkOnly`, or `Full`. | | `-p:CreatePackage` | Set to `true` so that a package (*.pkg*) is created for the app at the end of the build. | @@ -221,7 +221,7 @@ To publish your Mac Catalyst app from the command line on a Mac, open a terminal For example, use the following command to build and sign a *.pkg* on a Mac, for distribution outside the Mac App Store: ```dotnetcli -dotnet publish -f net7.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 +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 [Publishing output](../includes/publishing-output.md)] @@ -255,7 +255,7 @@ For a full list of build properties, see [Project file properties](https://githu The following example shows a typical property group for building and signing your Mac Catalyst app for distribution outside the Mac App Store: ```xml - + SdkOnly True true diff --git a/docs/mac-catalyst/deployment/publish-unsigned.md b/docs/mac-catalyst/deployment/publish-unsigned.md index 36d3d3a3e2..ac76320188 100644 --- a/docs/mac-catalyst/deployment/publish-unsigned.md +++ b/docs/mac-catalyst/deployment/publish-unsigned.md @@ -16,7 +16,7 @@ To publish an unsigned .NET Multi-platform App UI (.NET MAUI) Mac Catalyst app, | Parameter | Value | |------------------------------|-----------------------------------------------------------------------------------------------------| -| `-f` or `--framework` | The target framework, which is `net7.0-maccatalyst`. | +| `-f` or `--framework` | The target framework, which is `net8.0-maccatalyst`. | | `-c` or `--configuration` | The build configuration, which is `Release`. | | `-p:MtouchLink` | The link mode for the project, which can be `None`, `SdkOnly`, or `Full`. | | `-p:CreatePackage` | An optional parameter that controls whether to create an .app or a .pkg. Use `false` for an *.app*. | @@ -37,16 +37,16 @@ Additional build parameters can be specified on the command line. The following For example, use the following command to create an *.app*: ```dotnetcli -dotnet publish -f net7.0-maccatalyst -c Release -p:CreatePackage=false +dotnet publish -f net8.0-maccatalyst -c Release -p:CreatePackage=false ``` Use the following command to create a *.pkg*: ```dotnetcli -dotnet publish -f net7.0-maccatalyst -c Release +dotnet publish -f net8.0-maccatalyst -c Release ``` -Publishing builds the app, and then copies the *.app* to the *bin/Release/net7.0-maccatalyst/* folder or the *.pkg* to the *bin/Release/net7.0-maccatalyst/publish/* folder. If you publish the app using only a single architecture, the *.app* will be published to the *bin/Release/net7.0-maccatalyst/{architecture}/* folder while the *.pkg* will be published to the *bin/Release/net7.0-maccatalyst/{architecture}/publish/* folder. +Publishing builds the app, and then copies the *.app* to the *bin/Release/net8.0-maccatalyst/* folder or the *.pkg* to the *bin/Release/net8.0-maccatalyst/publish/* folder. If you publish the app using only a single architecture, the *.app* will be published to the *bin/Release/net8.0-maccatalyst/{architecture}/* folder while the *.pkg* will be published to the *bin/Release/net8.0-maccatalyst/{architecture}/publish/* folder. For more information about the `dotnet publish` command, see [dotnet publish](/dotnet/core/tools/dotnet-publish). diff --git a/docs/mac-catalyst/includes/publishing-output.md b/docs/mac-catalyst/includes/publishing-output.md index 8517d31e5b..6f98366d11 100644 --- a/docs/mac-catalyst/includes/publishing-output.md +++ b/docs/mac-catalyst/includes/publishing-output.md @@ -3,7 +3,7 @@ ms.topic: include ms.date: 03/23/2023 --- -Publishing builds, signs, and packages the app, and then copies the *.pkg* to the *bin/Release/net7.0-maccatalyst/publish/* folder. If you publish the app using only a single architecture, it will be published to the *bin/Release/net7.0-maccatalyst/{architecture}/publish/* folder. +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` and `productbuild` to run: diff --git a/docs/mac-catalyst/includes/publishing-property-group.md b/docs/mac-catalyst/includes/publishing-property-group.md index b616321395..84aa0f1bc8 100644 --- a/docs/mac-catalyst/includes/publishing-property-group.md +++ b/docs/mac-catalyst/includes/publishing-property-group.md @@ -6,7 +6,7 @@ ms.date: 03/23/2023 This example `` adds a condition check, preventing the settings from being processed unless the condition check passes. The condition check looks for two items: 1. The build configuration is set to `Release`. -1. The target framework is set to something containing the text `net7.0-maccatalyst`. +1. The target framework is set to something containing the text `net8.0-maccatalyst`. 1. The platform is set to `AnyCPU`. If any of these conditions fail, the settings aren't processed. More importantly, the ``, ``, and `` settings aren't set, preventing the app from being signed. @@ -14,7 +14,7 @@ If any of these conditions fail, the settings aren't processed. More importantly After adding the above property group, the app can be published from the command line on a Mac by opening a terminal and navigating to the folder for your .NET MAUI app project. Then, run the following command: ```dotnetcli -dotnet build -f net7.0-maccatalyst -c Release +dotnet build -f net8.0-maccatalyst -c Release ``` -Publishing builds, signs, and packages the app, and then copies the *.pkg* to the *bin/Release/net7.0-maccatalyst/publish/* folder. +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/migration/android-binding-projects.md b/docs/migration/android-binding-projects.md index 5c87d8d75c..9846ec193c 100644 --- a/docs/migration/android-binding-projects.md +++ b/docs/migration/android-binding-projects.md @@ -19,7 +19,7 @@ To migrate a Xamarin.Android binding library to a .NET Android class library: ```xml - net7.0-android + net8.0-android 21 enable enable diff --git a/docs/migration/android-projects.md b/docs/migration/android-projects.md index c1eccd5022..92ef1cc08d 100644 --- a/docs/migration/android-projects.md +++ b/docs/migration/android-projects.md @@ -6,12 +6,12 @@ ms.date: 02/15/2023 # Xamarin.Android project migration -A .NET 7 project for a .NET Android app is similar to the following example: +A .NET 8 project for a .NET Android app is similar to the following example: ```xml - net7.0-android + net8.0-android Exe @@ -80,20 +80,20 @@ In Xamarin.Android, Java, and Kotlin Android projects, the `` element For more information about the `` element, see the [Android documentation](https://developer.android.com/guide/topics/manifest/uses-sdk-element). -In .NET 7+ Android apps, there are MSBuild properties to set these values. Using the MSBuild properties has other benefits. In most cases the `` element should be removed in favor of values in your project's `.csproj` file: +In .NET 8 Android apps, there are MSBuild properties to set these values. Using the MSBuild properties has other benefits. In most cases the `` element should be removed in favor of values in your project's `.csproj` file: ```xml - net7.0-android + net8.0-android 21 ``` -In this example, `net7.0-android` is shorthand for `net7.0-android33.0`. Future versions of .NET will track the latest Android version available at the time of the .NET release. +In this example, `net8.0-android` is shorthand for `net8.0-android34.0`. Future versions of .NET will track the latest Android version available at the time of the .NET release. -`TargetFramework` maps to `android:targetSdkVersion`. At build time, this value will automatically be included in the `` element for you. The benefit of using `TargetFramework` in this way is that you're given the matching C# binding for Android API 33 for `net7.0-android33.0`. Android releases independently of the .NET release cycle, so we have the flexibility to opt into `net7.0-android34.0` when a binding is available sometime after .NET 7's release. +`TargetFramework` maps to `android:targetSdkVersion`. At build time, this value will automatically be included in the `` element for you. The benefit of using `TargetFramework` in this way is that you're given the matching C# binding for Android API 34 for `net8.0-android34.0`. Android releases independently of the .NET release cycle, so we have the flexibility to opt into `net8.0-android35.0` when a binding is available for the next Android release. Similarly, `SupportedOSPlatformVersion` maps to `android:minSdkVersion`. At build time, this value will automatically be included in the `` element for you. Android APIs are decorated with the so that you get build warnings for calling APIs that are only available for some of the Android versions your app can run on: @@ -144,7 +144,7 @@ With `AndroidLinkMode=SdkOnly`, only BCL and SDK assemblies marked with `%(Trimm `$(RunAOTCompilation)` is the new MSBuild property for enabling Ahead-of-Time (AoT) compilation. This is the same property used for [Blazor WASM](/aspnet/core/blazor/host-and-deploy/webassembly/#ahead-of-time-aot-compilation). The `$(AotAssemblies)` property also enables AOT, in order to help with migration from Xamarin.Android projects to .NET Android projects. > [!TIP] -> You should migrate to the new `$(RunAOTCompilation)` property, because `$(AotAssemblies)` is deprecated in .NET 7. +> You should migrate to the new `$(RunAOTCompilation)` property, because `$(AotAssemblies)` is deprecated from .NET 7. Release builds default to the following AOT property values: diff --git a/docs/migration/apple-projects.md b/docs/migration/apple-projects.md index e6871d2f92..0f95b5340c 100644 --- a/docs/migration/apple-projects.md +++ b/docs/migration/apple-projects.md @@ -6,12 +6,12 @@ ms.date: 02/15/2023 # Xamarin Apple project migration -A .NET 7 project for a .NET iOS app is similar to the following example: +A .NET 8 project for a .NET iOS app is similar to the following example: ```xml - net7.0-ios + net8.0-ios Exe enable true @@ -81,7 +81,7 @@ For more information about the `RuntimeIdentifier` property, see [RuntimeIdentif ### Convert to UseNativeHttpHandler -The following table shows how to convert the `HttpClientHandler` and `MtouchHttpClientHandler` properties to the `UseNativeHttpHandler` property when migrating a Xamarin Apple project to .NET 7+: +The following table shows how to convert the `HttpClientHandler` and `MtouchHttpClientHandler` properties to the `UseNativeHttpHandler` property when migrating a Xamarin Apple project to .NET 8: | Value | UseNativeHttpHandler | | ------------------ | ------------------ | @@ -103,7 +103,7 @@ Some values have moved from *Info.plist* to the project file. ### MinimumOSVersion and LSMinimumSystemVersion -The `MinimumOSVersion` and `LSMinimumSystemVersion` properties should be converted to the `SupportedOSPlatformVersion` property in .NET 7+ projects. For more information, see [Ensure MinimumOSVersion is consistent with SupportedOSPlatformVersion](https://github.com/xamarin/xamarin-macios/issues/12336). +The `MinimumOSVersion` and `LSMinimumSystemVersion` properties should be converted to the `SupportedOSPlatformVersion` property in .NET 8 projects. For more information, see [Ensure MinimumOSVersion is consistent with SupportedOSPlatformVersion](https://github.com/xamarin/xamarin-macios/issues/12336). ## See also diff --git a/docs/migration/includes/update-app-dependencies.md b/docs/migration/includes/update-app-dependencies.md index 0156fb5c14..677aff4d4c 100644 --- a/docs/migration/includes/update-app-dependencies.md +++ b/docs/migration/includes/update-app-dependencies.md @@ -5,25 +5,25 @@ ms.date: 08/30/2023 ## Update app dependencies -Generally, Xamarin.Forms NuGet packages are not compatible with .NET 7+ unless they have been recompiled using .NET target framework monikers (TFMs). However, Android apps can use NuGet packages targeting the `monoandroid` and `monoandroidXX.X` frameworks. +Generally, Xamarin.Forms NuGet packages are not compatible with .NET 8 unless they have been recompiled using .NET target framework monikers (TFMs). However, Android apps can use NuGet packages targeting the `monoandroid` and `monoandroidXX.X` frameworks. -You can confirm a package is .NET 7+ compatible by looking at the **Frameworks** tab on [NuGet](https://nuget.org) for the package you're using, and checking that it lists one of the compatible frameworks shown in the following table: +You can confirm a package is .NET 8 compatible by looking at the **Frameworks** tab on [NuGet](https://nuget.org) for the package you're using, and checking that it lists one of the compatible frameworks shown in the following table: | Compatible frameworks | Incompatible frameworks | | --- | --- | -| net7.0-android, monoandroid, monoandroidXX.X | | -| net7.0-ios | monotouch, xamarinios, xamarinios10 | -| net7.0-macos | monomac, xamarinmac, xamarinmac20 | -| net7.0-tvos | xamarintvos | +| net8.0-android, monoandroid, monoandroidXX.X | | +| net8.0-ios | monotouch, xamarinios, xamarinios10 | +| net8.0-macos | monomac, xamarinmac, xamarinmac20 | +| net8.0-tvos | xamarintvos | | | xamarinwatchos | > [!NOTE] -> .NET Standard libraries that have no dependencies on the incompatible frameworks listed above are still compatible with .NET 7+. +> .NET Standard libraries that have no dependencies on the incompatible frameworks listed above are still compatible with .NET 8. If a package on [NuGet](https://nuget.org) indicates compatibility with any of the compatible frameworks above, regardless of also including incompatible frameworks, then the package is compatible. Compatible NuGet packages can be added to your .NET MAUI library project using the NuGet package manager in Visual Studio. -If you can't find a .NET 7+ compatible version of a NuGet package you should: +If you can't find a .NET 8 compatible version of a NuGet package you should: - Recompile the package with .NET TFMs, if you own the code. -- Look for a preview release of a .NET 7+ version of the package. -- Replace the dependency with a .NET 7+ compatible alternative. +- Look for a preview release of a .NET 8 version of the package. +- Replace the dependency with a .NET 8 compatible alternative. diff --git a/docs/migration/index.md b/docs/migration/index.md index 7d26c4ef86..4cda8e2773 100644 --- a/docs/migration/index.md +++ b/docs/migration/index.md @@ -1,6 +1,6 @@ --- title: "Upgrade from Xamarin to .NET" -description: "Learn how to upgrade Xamarin apps to .NET starting with .NET 7" +description: "Learn how to upgrade Xamarin apps to .NET." ms.date: 08/30/2023 --- @@ -33,7 +33,7 @@ Xamarin projects can run on .NET after completing an upgrade process. The follow > - Multi-project solutions **don't** need to become a multi-targeted single project. -To upgrade your Xamarin native projects to .NET, you'll first have to update the projects to be SDK-style projects and then update your dependencies to .NET 7+. For more information, see [Upgrade Xamarin.Android, Xamarin.iOS, and Xamarin.Mac apps to .NET](native-projects.md). +To upgrade your Xamarin native projects to .NET, you'll first have to update the projects to be SDK-style projects and then update your dependencies to .NET 8. For more information, see [Upgrade Xamarin.Android, Xamarin.iOS, and Xamarin.Mac apps to .NET](native-projects.md). The .NET Upgrade Assistant is a command-line tool that can help you upgrade multi-project Xamarin.Forms apps to multi-project .NET Multi-platform App UI (.NET MAUI) apps. After running the tool, in most cases the app will require additional effort to complete the upgrade. For more information, see [Upgrade a Xamarin.Forms app to a .NET MAUI app with the .NET Upgrade Assistant](upgrade-assistant.md). diff --git a/docs/migration/ios-binding-projects.md b/docs/migration/ios-binding-projects.md index f9c24f4272..d2a5b12365 100644 --- a/docs/migration/ios-binding-projects.md +++ b/docs/migration/ios-binding-projects.md @@ -17,7 +17,7 @@ To migrate a Xamarin.iOS binding library to a .NET iOS binding library: ```xml - net7.0-ios + net8.0-ios enable true true diff --git a/docs/migration/multi-project-to-multi-project.md b/docs/migration/multi-project-to-multi-project.md index 33b68512cb..edf1bcd62b 100644 --- a/docs/migration/multi-project-to-multi-project.md +++ b/docs/migration/multi-project-to-multi-project.md @@ -2,7 +2,7 @@ title: "Manually upgrade a Xamarin.Forms app to a multi-project .NET MAUI app" description: "Learn how to manually upgrade a Xamarin.Forms app to a multi-project .NET MAUI app." ms.date: 3/02/2023 -no-loc: [ "Xamarin.Forms", "Xamarin.Essentials", "Xamarin.CommunityToolkit", ".NET MAUI Community Toolkit", "SkiaSharp", "Xamarin.Forms.Maps", "Microsoft.Maui", "Microsoft.Maui.Controls", "net7.0-android", "net7.0-ios" ] +no-loc: [ "Xamarin.Forms", "Xamarin.Essentials", "Xamarin.CommunityToolkit", ".NET MAUI Community Toolkit", "SkiaSharp", "Xamarin.Forms.Maps", "Microsoft.Maui", "Microsoft.Maui.Controls", "net8.0-android", "net8.0-ios" ] --- # Manually upgrade a Xamarin.Forms app to a multi-project .NET MAUI app @@ -22,7 +22,7 @@ To migrate a Xamarin.Forms library project to a .NET MAUI library project, you m > - Update namespaces. > - Address any API changes. > - Configure .NET MAUI. -> - Upgrade or replace incompatible dependencies with .NET 7+ versions. +> - Upgrade or replace incompatible dependencies with .NET 8 versions. > - Compile and test your app. To simplify the upgrade process, you should create a new .NET MAUI library project of the same name as your Xamarin.Forms library project, and then copy in your code. This is the approach outlined below. @@ -41,10 +41,10 @@ In Visual Studio, create a new .NET MAUI class library project of the same name - net7.0;net7.0-android;net7.0-ios;net7.0-maccatalyst - $(TargetFrameworks);net7.0-windows10.0.19041.0 + net8.0;net8.0-android;net8.0-ios;net8.0-maccatalyst + $(TargetFrameworks);net8.0-windows10.0.19041.0 - + true true enable diff --git a/docs/migration/multi-project-to-single-project.md b/docs/migration/multi-project-to-single-project.md index 367d4dc393..22ca141c30 100644 --- a/docs/migration/multi-project-to-single-project.md +++ b/docs/migration/multi-project-to-single-project.md @@ -2,7 +2,7 @@ title: "Manually upgrade a Xamarin.Forms app to a single project .NET MAUI app" description: "Learn how to manually upgrade a Xamarin.Forms app to a single project .NET MAUI app." ms.date: 08/29/2023 -no-loc: [ "Xamarin.Forms", "Xamarin.Essentials", "Xamarin.CommunityToolkit", ".NET MAUI Community Toolkit", "SkiaSharp", "Xamarin.Forms.Maps", "Microsoft.Maui", "Microsoft.Maui.Controls", "net7.0-android", "net7.0-ios" ] +no-loc: [ "Xamarin.Forms", "Xamarin.Essentials", "Xamarin.CommunityToolkit", ".NET MAUI Community Toolkit", "SkiaSharp", "Xamarin.Forms.Maps", "Microsoft.Maui", "Microsoft.Maui.Controls", "net8.0-android", "net8.0-ios" ] --- # Manually upgrade a Xamarin.Forms app to a single project .NET MAUI app @@ -19,7 +19,7 @@ To migrate a Xamarin.Forms app to a single project .NET Multi-platform App UI (. > - Copy resources from your Xamarin.Forms app to the .NET MAUI app. > - Update namespaces. > - Address any API changes. -> - Upgrade or replace incompatible dependencies with .NET 7+ versions. +> - Upgrade or replace incompatible dependencies with .NET 8 versions. > - Compile and test your app. To simplify the upgrade process, you should create a new .NET MAUI app of the same name as your Xamarin.Forms app, and then copy in your code, configuration, and resources. This is the approach outlined below. diff --git a/docs/migration/native-essentials.md b/docs/migration/native-essentials.md index 705bd82c18..9ce0d8a790 100644 --- a/docs/migration/native-essentials.md +++ b/docs/migration/native-essentials.md @@ -28,7 +28,7 @@ To use .NET MAUIs native device functionality in a .NET Android or .NET iOS app, ```xml - net7.0-android + net8.0-android ... true @@ -42,7 +42,7 @@ To use .NET MAUIs native device functionality in a .NET Android or .NET iOS app, ```xml - net7.0-ios + net8.0-ios ... true diff --git a/docs/migration/native-projects.md b/docs/migration/native-projects.md index f50856ba5f..0dd64bc146 100644 --- a/docs/migration/native-projects.md +++ b/docs/migration/native-projects.md @@ -11,7 +11,7 @@ To upgrade your Xamarin native projects to .NET, you must: > [!div class="checklist"] > > - Update your project file to be SDK-style. -> - Update or replace incompatible dependencies with .NET 7+ versions. +> - Update or replace incompatible dependencies with .NET 8 versions. > - Compile and test your app. For most apps, you won't need to change namespaces or undertake other rewrites. @@ -29,7 +29,7 @@ The new project should be given the same project and package name as your existi ```xml - net7.0-android + net8.0-android 21 Exe enable @@ -42,7 +42,7 @@ The new project should be given the same project and package name as your existi ``` > [!IMPORTANT] -> The target framework moniker (TFM) is what denotes the project as using .NET, in this case .NET 7. Valid TFMs for equivalent Xamarin native projects are net7.0-android, net7.0-ios, net7.0-macos, net7.0-tvos. +> The target framework moniker (TFM) is what denotes the project as using .NET, in this case .NET 8. Valid TFMs for equivalent Xamarin native projects are net8.0-android, net8.0-ios, net8.0-macos, net8.0-tvos. Launch the app to confirm that your development environment can build the app. @@ -56,28 +56,28 @@ You'll also need to copy some project properties from your Xamarin native projec ## Update dependencies -Generally, Xamarin native NuGet packages are not compatible with .NET 7+ unless they have been recompiled using .NET TFMs. However, .NET Android apps can use NuGet packages targeting the `monoandroid` and `monoandroidXX.X` frameworks. +Generally, Xamarin native NuGet packages are not compatible with .NET 8 unless they have been recompiled using .NET TFMs. However, .NET Android apps can use NuGet packages targeting the `monoandroid` and `monoandroidXX.X` frameworks. -You can confirm a package is .NET 7+ compatible by looking at the **Frameworks** tab on [NuGet](https://nuget.org) for the package you're using, and checking that it lists one of the compatible frameworks shown in the following table: +You can confirm a package is .NET 8 compatible by looking at the **Frameworks** tab on [NuGet](https://nuget.org) for the package you're using, and checking that it lists one of the compatible frameworks shown in the following table: | Compatible frameworks | Incompatible frameworks | | --- | --- | -| net7.0-android, monoandroid, monoandroidXX.X | | -| net7.0-ios | monotouch, xamarinios, xamarinios10 | -| net7.0-macos | monomac, xamarinmac, xamarinmac20 | -| net7.0-tvos | xamarintvos | +| net8.0-android, monoandroid, monoandroidXX.X | | +| net8.0-ios | monotouch, xamarinios, xamarinios10 | +| net8.0-macos | monomac, xamarinmac, xamarinmac20 | +| net8.0-tvos | xamarintvos | | | xamarinwatchos | > [!NOTE] -> .NET Standard libraries that have no dependencies on the incompatible frameworks listed above are still compatible with .NET 7+. +> .NET Standard libraries that have no dependencies on the incompatible frameworks listed above are still compatible with .NET 8. If a package on [NuGet](https://nuget.org) indicates compatibility with any of the compatible frameworks above, regardless of also including incompatible frameworks, then the package is compatible. Compatible NuGet packages can be added to your .NET native project using the NuGet package manager in Visual Studio. -If you can't find a .NET 7+ compatible version of a NuGet package you should: +If you can't find a .NET 8 compatible version of a NuGet package you should: - Recompile the package with .NET TFMs, if you own the code. -- Look for a preview release of a .NET 7+ version of the package. -- Replace the dependency with a .NET 7+ compatible alternative. +- Look for a preview release of a .NET 8 version of the package. +- Replace the dependency with a .NET 8 compatible alternative. For information about migrating Xamarin.Essentials code in a .NET Android or .NET iOS app, see [Migrate Xamarin.Essentials code in .NET Android and .NET iOS apps](native-essentials.md). diff --git a/docs/migration/renderer-to-handler.md b/docs/migration/renderer-to-handler.md index 6681674bb1..184ec1985e 100644 --- a/docs/migration/renderer-to-handler.md +++ b/docs/migration/renderer-to-handler.md @@ -126,13 +126,13 @@ Filename-based multi-targeting is configured by adding the following XML to the ```xml - + - + diff --git a/docs/migration/upgrade-assistant.md b/docs/migration/upgrade-assistant.md index a0a7d74b79..74c50204d9 100644 --- a/docs/migration/upgrade-assistant.md +++ b/docs/migration/upgrade-assistant.md @@ -2,7 +2,7 @@ title: "Upgrade a Xamarin.Forms app to a .NET MAUI app with the .NET Upgrade Assistant" description: "Learn how to use .NET Upgrade Assistant to migrate a Xamarin.Forms app to a multi-project .NET MAUI app." ms.date: 08/21/2023 -no-loc: [ "Xamarin.Forms", "Xamarin.Essentials", "Xamarin.CommunityToolkit", ".NET MAUI Community Toolkit", "SkiaSharp", "Xamarin.Forms.Maps", "Microsoft.Maui", "Microsoft.Maui.Controls", "net7.0-android", "net7.0-ios" ] +no-loc: [ "Xamarin.Forms", "Xamarin.Essentials", "Xamarin.CommunityToolkit", ".NET MAUI Community Toolkit", "SkiaSharp", "Xamarin.Forms.Maps", "Microsoft.Maui", "Microsoft.Maui.Controls", "net8.0-android", "net8.0-ios" ] --- # Upgrade a Xamarin.Forms app to a .NET MAUI app with the .NET Upgrade Assistant @@ -10,7 +10,7 @@ no-loc: [ "Xamarin.Forms", "Xamarin.Essentials", "Xamarin.CommunityToolkit", ".N The .NET Upgrade Assistant helps you upgrade Xamarin.Forms projects to .NET Multi-platform App UI (.NET MAUI) by converting the solution's project file and by performing common code updates. Specifically, the tool will: - Convert the Xamarin.Forms class library project, Xamarin.iOS project, and Xamarin.Android project to SDK-style projects. -- Update the target framework in project files to net7.0-android and net7.0-ios, as required. +- Update the target framework in project files to net8.0-android and net8.0-ios, as required. - Set `true` in project files. - Add additional project properties, and remove project properties that aren't required. - Add and remove specific NuGet packages: diff --git a/docs/platform-integration/configure-multi-targeting.md b/docs/platform-integration/configure-multi-targeting.md index 20d9e76556..888fd27fad 100644 --- a/docs/platform-integration/configure-multi-targeting.md +++ b/docs/platform-integration/configure-multi-targeting.md @@ -22,25 +22,25 @@ A standard multi-targeting pattern is to include the platform as an extension in ```xml - + - + - + - + @@ -69,25 +69,25 @@ Another standard multi-targeting pattern is to include the platform as a folder ```xml - + - + - + - + @@ -116,7 +116,7 @@ Filename-based multi-targeting can be combined with folder-based multi-targeting ```xml - + @@ -124,7 +124,7 @@ Filename-based multi-targeting can be combined with folder-based multi-targeting - + @@ -132,7 +132,7 @@ Filename-based multi-targeting can be combined with folder-based multi-targeting - + @@ -140,7 +140,7 @@ Filename-based multi-targeting can be combined with folder-based multi-targeting - + diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 1a64e67dd5..5bfe384907 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -136,7 +136,7 @@ Use a `global.json` config file in the folder where you'll create the project. T Visual Studio may not be resolving the required workloads if you try to compile a project and receive an error similar to the following text: -> Platform version is not present for one or more target frameworks, even though they have specified a platform: net7.0-android, net7.0-ios, net7.0-maccatalyst +> Platform version is not present for one or more target frameworks, even though they have specified a platform: net8.0-android, net8.0-ios, net8.0-maccatalyst This problem typically results from having an x86 and x64 SDK installed, and the x86 version is being used. Visual Studio and .NET MAUI require the x64 .NET SDK. If your operating system has a system-wide `PATH` variable that is resolving the x86 SDK first, you need to fix that by either removing the x86 .NET SDK from the `PATH` variable, or promoting the x64 .NET SDK so that it resolves first. For more information on troubleshooting x86 vs x64 SDK resolution, see [Install .NET on Windows - Troubleshooting](/dotnet/core/install/windows#it-was-not-possible-to-find-any-installed-net-core-sdks). diff --git a/docs/user-interface/handlers/create.md b/docs/user-interface/handlers/create.md index 82b798b6d4..53744a097d 100644 --- a/docs/user-interface/handlers/create.md +++ b/docs/user-interface/handlers/create.md @@ -208,13 +208,13 @@ The `VideoHandler` class containing the mappers is named *VideoHandler.cs*. Its ```xml - + - + diff --git a/docs/user-interface/media/menubar/menubar-net7.png b/docs/user-interface/media/menubar/menubar.png similarity index 100% rename from docs/user-interface/media/menubar/menubar-net7.png rename to docs/user-interface/media/menubar/menubar.png diff --git a/docs/user-interface/menu-bar.md b/docs/user-interface/menu-bar.md index 171262800b..a0abf3c24b 100644 --- a/docs/user-interface/menu-bar.md +++ b/docs/user-interface/menu-bar.md @@ -68,7 +68,7 @@ The following example shows a that de This example defines three top-level menus. Each top-level menu has menu items, and the second top-level menu has a sub-menu and a separator: -:::image type="content" source="media/menubar/menubar-net7.png" alt-text="Screenshot of menu bar in .NET 7."::: +:::image type="content" source="media/menubar/menubar.png" alt-text="Screenshot of menu bar."::: > [!NOTE] > On Mac Catalyst, menu items are added to the system menu bar. diff --git a/docs/windows/deployment/publish-cli.md b/docs/windows/deployment/publish-cli.md index 46e4de6df8..b270ae9b75 100644 --- a/docs/windows/deployment/publish-cli.md +++ b/docs/windows/deployment/publish-cli.md @@ -109,7 +109,7 @@ To publish your app, open the **Developer Command Prompt for VS 2022** terminal | Parameter | Value | |------------------------------|-------------------------------------------------------------------------------------| -| `-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 `` node in your *.csproj* file. | +| `-f` | The target framework, which is `net8.0-windows{version}`. This value is a Windows TFM, such as `net8.0-windows10.0.19041.0`. Ensure that this value is identical to the value in the `` node in your *.csproj* file. | | `-c` | The build configuration, which is `Release`. | | `-p:RuntimeIdentifierOverride=win10-x64`
- or -
`-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. @@ -119,10 +119,10 @@ To publish your app, open the **Developer Command Prompt for VS 2022** terminal For example: ```console -dotnet publish -f net7.0-windows10.0.19041.0 -c Release -p:RuntimeIdentifierOverride=win10-x64 +dotnet publish -f net8.0-windows10.0.19041.0 -c Release -p:RuntimeIdentifierOverride=win10-x64 ``` -Publishing builds and packages the app, copying the signed package to the _bin\\Release\\net7.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. +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-visual-studio-folder.md b/docs/windows/deployment/publish-visual-studio-folder.md index cad9a5d452..df32a68d1b 100644 --- a/docs/windows/deployment/publish-visual-studio-folder.md +++ b/docs/windows/deployment/publish-visual-studio-folder.md @@ -15,9 +15,9 @@ This article describes how to use Visual Studio to publish your .NET MAUI app fo ## Set the build target -In Visual Studio, you can only publish to one platform at a time. The target platform is selected with the **Debug Target** drop-down in the Visual Studio toolbar. Set the target to **Windows Machine** or to **Framework** > **net7.0-windows**, as illustrated in the following image: +In Visual Studio, you can only publish to one platform at a time. The target platform is selected with the **Debug Target** drop-down in the Visual Studio toolbar. Set the target to **Windows Machine** or to **Framework** > **net8.0-windows**, as illustrated in the following image: -:::image type="content" source="media/publish-visual-studio/vs-debugtarget-net7.png" alt-text="Selecting the Windows debug target for a .NET MAUI app in Visual Studio using .NET 7."::: +:::image type="content" source="media/publish-visual-studio/vs-debugtarget-net7.png" alt-text="Selecting the Windows debug target for a .NET MAUI app in Visual Studio."::: ## Publish the project diff --git a/docs/windows/setup.md b/docs/windows/setup.md index f4f4aaa967..cc5c02db3a 100644 --- a/docs/windows/setup.md +++ b/docs/windows/setup.md @@ -5,7 +5,6 @@ ms.date: 02/28/2022 ms.custom: updateeachrelease --- - # Deploy and debug your .NET MAUI app on Windows You can use your local Windows development computer to deploy and debug a .NET Multi-platform App UI (.NET MAUI) app. This article describes how to configure Windows to debug a .NET MAUI app. @@ -36,9 +35,9 @@ Developer Mode is enabled in **Settings** app, under **Update & Security** > **F ## Target Windows -In Visual Studio, set the **Debug Target** to **Framework (...)** > **net7.0-windows**. There is a version number in the item entry, which may or may not match the following screenshot: +In Visual Studio, set the **Debug Target** to **Framework (...)** > **net8.0-windows**. There is a version number in the item entry, which may or may not match the following screenshot: -:::image type="content" source="media/setup/vs-target-windows-net7.png" alt-text="Visual Studio debug target set to Windows for .NET MAUI app using .NET 7."::: +:::image type="content" source="media/setup/vs-target-windows-net7.png" alt-text="Visual Studio debug target set to Windows for .NET MAUI app.":::