Architecture and OS targeting improvements for .NET 6
See original GitHub issueFor 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): – https://github.com/dotnet/sdk/pull/18889
build
publish
tool install
test
run
watch run
watch test
- Enable shorthand RID syntax for
tool install
(separate PR from other verbs)-- #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 https://github.com/dotnet/sdk/pull/18216
- The Windows Arm64 SDK should treat pre .NET 5 versions as X64 by default.-- https://github.com/dotnet/sdk/pull/19052
- Parity syntax between
dotnet build
anddotnet publish
for pivoting between self-contained and framework-dependent modalities, for example:-- https://github.com/dotnet/sdk/pull/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.-- https://github.com/dotnet/sdk/pull/18837 - Add a warning when using
-r
with either--os
or--arch
– https://github.com/dotnet/sdk/pull/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.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
What's new in .NET 6
ASP.NET Core includes improvements in minimal APIs, ahead-of-time (AOT) compilation for Blazor WebAssembly apps, and single-page apps. In ...
Read more >Performance Improvements in .NET 6
Take a rip-roarin' tour through hundreds of PRs worth of performance improvements for .NET 6.
Read more >The best new features in .NET 6
One of the most enticing enhancements is the .NET Multi-platform App UI (.NET MAUI). You can now write code that provides a modern...
Read more >NET SDK build types and Architecture targeting
The primary scenario is enabling the native-architecture SDK to target an emulated architecture. For example, dotnet run , dotnet test , and dotnet...
Read more >Introducing the .NET 6 runtime for AWS Lambda
When targeting .NET 6 support, you can take advantage of System.Text.Json's source generator support to improve cold start performance.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yup, pick up a nightly build in a few hours, once it’s flowed: https://github.com/dotnet/installer#installers-and-binaries
Thanks! How can I test the latest behavior? Try a nightly build?