question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Architecture and OS targeting improvements for .NET 6

See original GitHub issue

https://github.com/dotnet/designs/blob/d248ad68b41866eba17e80225a08518b8202ddf6/accepted/2021/architecture-targeting.md#net-6

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): – 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:
  • Parity syntax between dotnet build and dotnet publish for pivoting between self-contained and framework-dependent modalities, for example:-- https://github.com/dotnet/sdk/pull/18837
    • dotnet 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 --archhttps://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:closed
  • Created 2 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
sfoslundcommented, Jul 30, 2021

Yup, pick up a nightly build in a few hours, once it’s flowed: https://github.com/dotnet/installer#installers-and-binaries

0reactions
richlandercommented, Jul 30, 2021

Thanks! How can I test the latest behavior? Try a nightly build?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found