Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Breaking change]: Projects targeting .NET 8 and higher will by default use a smaller, portable RID graph. #36527

Closed
2 of 3 tasks
elinor-fung opened this issue Aug 4, 2023 · 0 comments · Fixed by #36977
Closed
2 of 3 tasks
Assignees
Labels
breaking-change Indicates a .NET Core breaking change doc-idea Indicates issues that are suggestions for new topics [org][type][category] Pri1 High priority, do before Pri2 and Pri3 📌 seQUESTered Identifies that an issue has been imported into Quest. source incompatible Source code may encounter a breaking change in behavior when targeting the new version.

Comments

@elinor-fung
Copy link
Member

elinor-fung commented Aug 4, 2023

Description

Projects targeting .NET 8 and higher will by default use a smaller, "portable" RuntimeIdentifier graph.

PR: dotnet/sdk#34279
cc @dsplaisted

Related:

Version

.NET 8 RC 1

Previous behavior

The .NET SDK used a complex RID graph to determine assets when building or publishing a project.

New behavior

The .NET SDK, for projects targeting .NET 8, will use a smaller graph consisting of only portable RIDs. This means that it will not recognize version/distro-specific RIDs by default.

Type of breaking change

  • Binary incompatible: Existing binaries may encounter a breaking change in behavior, such as failure to load or execute, and if so, require recompilation.
  • Source incompatible: When recompiled using the new SDK or component or to target the new runtime, existing source code may require source changes to compile successfully.
  • Behavioral change: Existing binaries may behave differently at run time.

Reason for change

The RID graph was costly to maintain and understand, requiring .NET itself to be distro-aware in a fragile manner. The .NET team and the community spend a non-trivial amount of time updating the graph and backporting such updates to previous releases. The long-term goal is to stop updating the RID graph, stop reading it, and eventually remove it. This breaking change is a step towards that goal.

Recommended action

Use portable RIDs, for example, linux-<arch>, linux-musl-<arch>, osx-<arch>, and win-<arch>.

If you need to revert to the previous behaviour of using the old, full RID graph, you can set the UseRidGraph property to true in your project. Note that the old RID graph will not be updated to attempt to handle any other distros / architectures.

Feature area

SDK

Affected APIs

No response


Associated WorkItem - 156738

@elinor-fung elinor-fung added doc-idea Indicates issues that are suggestions for new topics [org][type][category] breaking-change Indicates a .NET Core breaking change Pri1 High priority, do before Pri2 and Pri3 labels Aug 4, 2023
@dotnet-bot dotnet-bot added ⌚ Not Triaged Not triaged source incompatible Source code may encounter a breaking change in behavior when targeting the new version. labels Aug 4, 2023
@gewarren gewarren removed the ⌚ Not Triaged Not triaged label Aug 4, 2023
@gewarren gewarren added the 🗺️ reQUEST Triggers an issue to be imported into Quest. label Sep 5, 2023
@ghost ghost added the in-pr This issue will be closed (fixed) by an active pull request. label Sep 5, 2023
@github-actions github-actions bot added 📌 seQUESTered Identifies that an issue has been imported into Quest. and removed 🗺️ reQUEST Triggers an issue to be imported into Quest. labels Sep 6, 2023
@ghost ghost removed the in-pr This issue will be closed (fixed) by an active pull request. label Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Indicates a .NET Core breaking change doc-idea Indicates issues that are suggestions for new topics [org][type][category] Pri1 High priority, do before Pri2 and Pri3 📌 seQUESTered Identifies that an issue has been imported into Quest. source incompatible Source code may encounter a breaking change in behavior when targeting the new version.
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants