From f130948c0b88258d5a8707db55e49796f959bd3b Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Fri, 21 Oct 2022 16:58:54 -0700 Subject: [PATCH] Document UseCurrentRuntime Initial Feature was added in 2020 but not documented here: https://github.com/dotnet/sdk/issues/10449 We've added implicit RIDs here: https://github.com/dotnet/sdk/pull/26143 And we've added interaction to toggle implicit RIDs off with UCR here: https://github.com/dotnet/sdk/pull/28628 And we added the shorthand for ucr here: https://github.com/dotnet/sdk/pull/27971 Needs to be duplicated for `dotnet publish` as well. --- docs/core/tools/dotnet-build.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/core/tools/dotnet-build.md b/docs/core/tools/dotnet-build.md index c6dab7bf5aa6f..06e954723ffb0 100644 --- a/docs/core/tools/dotnet-build.md +++ b/docs/core/tools/dotnet-build.md @@ -19,7 +19,7 @@ dotnet build [|] [-a|--arch ] [--force] [--interactive] [--no-dependencies] [--no-incremental] [--no-restore] [--nologo] [--no-self-contained] [--os ] [-o|--output ] [-r|--runtime ] - [--self-contained [true|false]] [--source ] + [--self-contained [true|false]] [--source ] [--use-current-runtime, --ucr [true|false]] [-v|--verbosity ] [--version-suffix ] dotnet build -h|--help @@ -134,6 +134,10 @@ The project or solution file to build. If a project or solution file isn't speci [!INCLUDE [verbosity](../../../includes/cli-verbosity-minimal.md)] +- **`--use-current-runtime, --ucr [true|false]`** + + Sets the `RuntimeIdentifier` to a platform portable `RuntimeIdentifier` based on the one of your machine. This happens implicitly with properties that require a `RuntimeIdentifier`, such as `SelfContained`, `PublishAot`, `PublishSelfContained`, `PublishSingleFile`, and `PublishReadyToRun`. If the property is set to false, that implicit resolution will no longer occur. + - **`--version-suffix `** Sets the value of the `$(VersionSuffix)` property to use when building the project. This only works if the `$(Version)` property isn't set. Then, `$(Version)` is set to the `$(VersionPrefix)` combined with the `$(VersionSuffix)`, separated by a dash.