[Breaking change]: Projects targeting .NET 8 and higher will by default use a smaller, portable RID graph. #36527
Closed
2 of 3 tasks
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.
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
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>
, andwin-<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
The text was updated successfully, but these errors were encountered: