Skip to content

Commit f130948

Browse files
authored
Document UseCurrentRuntime
Initial Feature was added in 2020 but not documented here: dotnet/sdk#10449 We've added implicit RIDs here: dotnet/sdk#26143 And we've added interaction to toggle implicit RIDs off with UCR here: dotnet/sdk#28628 And we added the shorthand for ucr here: dotnet/sdk#27971 Needs to be duplicated for `dotnet publish` as well.
1 parent 8ba421d commit f130948

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

docs/core/tools/dotnet-build.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ dotnet build [<PROJECT>|<SOLUTION>] [-a|--arch <ARCHITECTURE>]
1919
[--force] [--interactive] [--no-dependencies] [--no-incremental]
2020
[--no-restore] [--nologo] [--no-self-contained] [--os <OS>]
2121
[-o|--output <OUTPUT_DIRECTORY>] [-r|--runtime <RUNTIME_IDENTIFIER>]
22-
[--self-contained [true|false]] [--source <SOURCE>]
22+
[--self-contained [true|false]] [--source <SOURCE>] [--use-current-runtime, --ucr [true|false]]
2323
[-v|--verbosity <LEVEL>] [--version-suffix <VERSION_SUFFIX>]
2424
2525
dotnet build -h|--help
@@ -134,6 +134,10 @@ The project or solution file to build. If a project or solution file isn't speci
134134

135135
[!INCLUDE [verbosity](../../../includes/cli-verbosity-minimal.md)]
136136

137+
- **`--use-current-runtime, --ucr [true|false]`**
138+
139+
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.
140+
137141
- **`--version-suffix <VERSION_SUFFIX>`**
138142

139143
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.

0 commit comments

Comments
 (0)