Closed
Description
For the shorthand RID, the proposal is to go with --arch and -a and --os (no need for a short form of os).
.NET 6
The following changes should be included in .NET 6, motivated by the x64 emulation scenario. They are all additive and non-breaking.
- Enable shorthand RID syntax. Add to the following verbs (priority order): -- Adding OS and arch command line options #18889
build
publish
tool install
test
run
watch run
watch test
- Enable shorthand RID syntax for
tool install
(separate PR from other verbs)-- Adding arch option to tool install command #19370 - Do NOT enable the
-r
RID syntax on these same verbs. Doing so would cause a breaking change in .NET 7, which seems like a unforgivable mistake.-- No-op - Enable implicit RID where there is one known choice:
- The macOS Arm64 SDK should treat pre .NET 6 versions as X64 by default.-- Fixed by Add property for opting out of apphost signing in macOS #18216
- The Windows Arm64 SDK should treat pre .NET 5 versions as X64 by default.-- Set pre-net5 win-arm64 to x64 by default #19052
- Parity syntax between
dotnet build
anddotnet publish
for pivoting between self-contained and framework-dependent modalities, for example:-- Update self contained/ runtime command line options for build and publish #18837dotnet build -r win-x64 --self-contained
dotnet build -r win-x64 --self-contained true
dotnet build -r win-x64 --self-contained false
dotnet build -r win-x64 --no-self-contained
- Add warning when using
-r
without a--self-contained
or--no-self-contained
. The warning is for .NET 6+ apps only.-- Update self contained/ runtime command line options for build and publish #18837 - Add a warning when using
-r
with either--os
or--arch
-- Adding OS and arch command line options #18889
The addition of the shorthand RID syntax and the parity syntax between build
and publish
will provide a satisfactory set of gestures to enable migration with .NET 6 to a non-breaking syntax with respect to .NET 7. In particular, users need to migrate any uses of -r
to always be accompanied by one of the --self-contained
or --no-self-contained
switches.