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
12 changes: 6 additions & 6 deletions docs/android/deployment/publish-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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]
Expand All @@ -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).

Expand Down
4 changes: 2 additions & 2 deletions docs/android/manifest.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<!-- TODO: Uncomment when VS 17.6 P2 is released
> [!NOTE]
Expand Down Expand Up @@ -181,7 +181,7 @@ public class MainApplication : MauiApplication

```

This declaration causes the following XML fragment to be generated in *obj\\Debug\\net7.0-android\\AndroidManifest.xml*:
This declaration causes the following XML fragment to be generated in *obj\\Debug\\net8.0-android\\AndroidManifest.xml*:

```xml
<application android:label="MyMauiApp" android:theme="@style/Maui.SplashTheme" android:debuggable="true" ...>
Expand Down
6 changes: 3 additions & 3 deletions docs/deployment/visual-studio-properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ The **Application** section describes some settings related to which platforms y
| Setting | Default value | Description |
| - | - | - |
| Target the iOS platform | Checked | Specifies that this project will target the iOS platform. |
| Target iOS Framework | `net7.0-ios` | The [Target Framework Moniker][tfm] used to target iOS.
| Target iOS Framework | `net8.0-ios` | The [Target Framework Moniker][tfm] used to target iOS.
| Minimum Target iOS Framework | `14.2` | The minimum version of iOS your app targets.

- **Android Targets**
Expand All @@ -38,7 +38,7 @@ The **Application** section describes some settings related to which platforms y
| Setting | Default value | Description |
| - | - | - |
| Target the Android platform | Checked | When checked, the .NET MAUI project will target and build an Android version of your app. Uncheck to disable the Android target. |
| Target Android Framework | `net7.0-android` | The [Target Framework Moniker][tfm] used to target Android.
| Target Android Framework | `net8.0-android` | The [Target Framework Moniker][tfm] used to target Android.
| Minimum Target Android Framework | `21.0` | The minimum version of Android your app targets.

- **Windows Targets**
Expand All @@ -48,7 +48,7 @@ The **Application** section describes some settings related to which platforms y
| Setting | Default value | Description |
| - | - | - |
| Target the Windows platform | Checked | When checked, the .NET MAUI project will target and build a Windows version of your app. Uncheck to disable the Windows target. |
| Target Windows Framework | `net7.0-windows10.0.19041.0` | The [Target Framework Moniker][tfm] used to target Windows.
| Target Windows Framework | `net8.0-windows10.0.19041.0` | The [Target Framework Moniker][tfm] used to target Windows.
| Minimum Target Windows Framework | `10.0.17763.0` | The minimum version of Windows your app targets.

## Build
Expand Down
2 changes: 1 addition & 1 deletion docs/get-started/first-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ If your app fails to compile, review [Troubleshooting known issues](../troublesh
:::zone pivot="devices-windows"

<!-- markdownlint-disable MD029 -->
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.":::

Expand Down
6 changes: 3 additions & 3 deletions docs/get-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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="<ANDROID SDK DIRECTORY>" -p:AcceptAndroidSDKLicenses=True`
`dotnet build -t:InstallAndroidDependencies -f:net8.0-android -p:AndroidSdkDirectory="<ANDROID SDK DIRECTORY>" -p:AcceptAndroidSDKLicenses=True`
On Windows, the suggested Android SDK directory value is `%LOCALAPPDATA%/Android/Sdk`.

> [!NOTE]
Expand All @@ -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="<ANDROID SDK DIRECTORY>" -p:AcceptAndroidSDKLicenses=True`
`dotnet build -t:InstallAndroidDependencies -f:net8.0-android -p:AndroidSdkDirectory="<ANDROID SDK DIRECTORY>" -p:AcceptAndroidSDKLicenses=True`
On macOS, the suggested Android SDK directory value is `$HOME/Library/Android/sdk`.

### Linux
Expand Down Expand Up @@ -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

Expand Down
8 changes: 4 additions & 4 deletions docs/ios/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand All @@ -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.
Expand Down
18 changes: 9 additions & 9 deletions docs/ios/deployment/publish-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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).

Expand All @@ -60,29 +60,29 @@ If the `RuntimeIdentifier` parameter isn't specified on the command line, or in
One solution to these issues is to add the following `<PropertyGroup>` to your project file:

```xml
<PropertyGroup Condition="'$(IsPublishing)' == 'true' And '$(TargetFramework)' == 'net7.0-ios'">
<PropertyGroup Condition="'$(IsPublishing)' == 'true' And '$(TargetFramework)' == 'net8.0-ios'">
<RuntimeIdentifier>ios-arm64</RuntimeIdentifier>
</PropertyGroup>
```

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 `<PropertyGroup>` to your project file:

```xml
<PropertyGroup Condition="'$(Configuration)' == 'Release' And '$(TargetFramework)' == 'net7.0-ios'">
<PropertyGroup Condition="'$(Configuration)' == 'Release' And '$(TargetFramework)' == 'net8.0-ios'">
<RuntimeIdentifier>ios-arm64</RuntimeIdentifier>
</PropertyGroup>
```

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
Expand Down Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion docs/ios/pair-to-mac.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading