Skip to content

Commit

Permalink
Update build-targets.md
Browse files Browse the repository at this point in the history
Wrap MSBuild properties which may contain spaces in double-quotes.

Fix message formatting.
  • Loading branch information
jonpryor authored and dellis1972 committed Nov 30, 2023
1 parent 80201de commit 1206d01
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Documentation/guides/building-apps/build-targets.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,17 @@ Calls the [`GetAndroidDependencies`](#getandroiddependencies) target, then insta
the Android SDK packages specified in the `@(AndroidDependency)` item group.

```dotnetcli
dotnet build -t:InstallAndroidDependencies -f net8.0-android -p:AndroidSdkDirectory=<path to sdk> -p:JavaSdkDirectory=<path to java sdk>
dotnet build -t:InstallAndroidDependencies -f net8.0-android "-p:AndroidSdkDirectory=<path to sdk>" "-p:JavaSdkDirectory=<path to java sdk>"
```

The `-f net8.0-android` is required as this target is a .NET Android specific target. If you omit this argument
you will get the following error
you will get the following error:

`error MSB4057: The target "InstallAndroidDependencies" does not exist in the project`
```
error MSB4057: The target "InstallAndroidDependencies" does not exist in the project.
```

The `AndroidSdkDirectory` and `JavaSdkDirectory` are required as we need to know where to install the required components. These directories can be empty or existing. Sdk components
The `AndroidSdkDirectory` and `JavaSdkDirectory` properties are required as we need to know where to install the required components. These directories can be empty or existing. Sdk components
will be installed on top on an existing sdk installation.

The [`$(AndroidManifestType)`](~/android/deploy-test/building-apps/build-properties.md#androidmanifesttype)
Expand Down

0 comments on commit 1206d01

Please sign in to comment.