From fe08ad7fb095cd758d1a44eb6b3844c06d8cfecf Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Mon, 28 Apr 2025 15:05:27 -0700 Subject: [PATCH 1/3] Update netsdk1206.md to match the breaking change document https://learn.microsoft.com/en-us/dotnet/core/compatibility/sdk/8.0/rid-graph --- docs/core/tools/sdk-errors/netsdk1206.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/core/tools/sdk-errors/netsdk1206.md b/docs/core/tools/sdk-errors/netsdk1206.md index d52b7535e7312..7ead0297becb4 100644 --- a/docs/core/tools/sdk-errors/netsdk1206.md +++ b/docs/core/tools/sdk-errors/netsdk1206.md @@ -12,18 +12,19 @@ NETSDK1206 indicates your project has assets for version-specific or distributio First, check for a newer version of any affected packages to see if they have moved to portable RIDs. Many packages have already moved to portable RIDs in their latest versions. If no such version exists, we recommend contacting the package authors to request switching the package to use only portable RIDs. -If you know your application does not actually need the specified RID—for example, it is not intended to run on the platform specified by the RID—you can suppress the warning using the [`NoWarn` MSBuild property](/visualstudio/msbuild/common-msbuild-project-properties). For example: +If you know your application does not actually need the specified RID—for example, it is not intended to run on the platform specified by the RID—you can switch to using a more general rid. For example, change win10-x64 to win-x64 in your project file: ```xml - $(NoWarn);NETSDK1206 + ... + win-x64 ``` -If your application does need the specified RID and the affected package doesn't have a version that uses portable RIDs, the runtime can be configured to perform asset resolution via the old RID graph with version-specific and distro-specific RIDs. Note that the old RID graph is no longer updated and exists only as a backwards compatibility option. +If you need to revert to the previous behavior of using the old, full RID graph, you can set the UseRidGraph MSBuild property to true in your project file. However, the old RID graph won't be updated in the future to attempt to handle any other distros or architectures. ```xml - - - + + true + ``` From c3bbcbce95f2d9b3b1842730a974c281e2687bb0 Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Tue, 6 May 2025 14:52:37 -0700 Subject: [PATCH 2/3] Apply suggestions from code review Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com> --- docs/core/tools/sdk-errors/netsdk1206.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/core/tools/sdk-errors/netsdk1206.md b/docs/core/tools/sdk-errors/netsdk1206.md index 7ead0297becb4..63806237f737c 100644 --- a/docs/core/tools/sdk-errors/netsdk1206.md +++ b/docs/core/tools/sdk-errors/netsdk1206.md @@ -12,7 +12,7 @@ NETSDK1206 indicates your project has assets for version-specific or distributio First, check for a newer version of any affected packages to see if they have moved to portable RIDs. Many packages have already moved to portable RIDs in their latest versions. If no such version exists, we recommend contacting the package authors to request switching the package to use only portable RIDs. -If you know your application does not actually need the specified RID—for example, it is not intended to run on the platform specified by the RID—you can switch to using a more general rid. For example, change win10-x64 to win-x64 in your project file: +If you know your application does not actually need the specified RID—for example, it is not intended to run on the platform specified by the RID—you can switch to using a more general RID. For example, change `win10-x64` to `win-x64` in your project file: ```xml @@ -21,7 +21,7 @@ If you know your application does not actually need the specified RID—for ``` -If you need to revert to the previous behavior of using the old, full RID graph, you can set the UseRidGraph MSBuild property to true in your project file. However, the old RID graph won't be updated in the future to attempt to handle any other distros or architectures. +If you need to revert to the previous behavior of using the old, full RID graph, you can set the `UseRidGraph` MSBuild property to `true` in your project file. However, the old RID graph won't be updated in the future to attempt to handle any other distros or architectures. ```xml From 051d846ffc76a332da3d88c230d68116a54434e1 Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Tue, 6 May 2025 14:54:00 -0700 Subject: [PATCH 3/3] Add additional CLI guidance from the breaking change doc --- docs/core/tools/sdk-errors/netsdk1206.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/core/tools/sdk-errors/netsdk1206.md b/docs/core/tools/sdk-errors/netsdk1206.md index 63806237f737c..68f1c2e235723 100644 --- a/docs/core/tools/sdk-errors/netsdk1206.md +++ b/docs/core/tools/sdk-errors/netsdk1206.md @@ -21,6 +21,8 @@ If you know your application does not actually need the specified RID—for ``` +If you specify the RID as a command-line argument, make a similar change. For example, instead of `dotnet publish --framework net8.0 --runtime win10-x64`, use the command `dotnet publish --framework net8.0 --runtime win-x64`. + If you need to revert to the previous behavior of using the old, full RID graph, you can set the `UseRidGraph` MSBuild property to `true` in your project file. However, the old RID graph won't be updated in the future to attempt to handle any other distros or architectures. ```xml