Skip to content

Commit 76e0b50

Browse files
Update netsdk1206.md to match the breaking change document (#45941)
* Update netsdk1206.md to match the breaking change document https://learn.microsoft.com/en-us/dotnet/core/compatibility/sdk/8.0/rid-graph * Apply suggestions from code review Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com> * Add additional CLI guidance from the breaking change doc --------- Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
1 parent 0ed1408 commit 76e0b50

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

docs/core/tools/sdk-errors/netsdk1206.md

+9-6
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,21 @@ NETSDK1206 indicates your project has assets for version-specific or distributio
1212

1313
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.
1414

15-
If you know your application does not actually need the specified RID&mdash;for example, it is not intended to run on the platform specified by the RID&mdash;you can suppress the warning using the [`NoWarn` MSBuild property](/visualstudio/msbuild/common-msbuild-project-properties). For example:
15+
If you know your application does not actually need the specified RID&mdash;for example, it is not intended to run on the platform specified by the RID&mdash;you can switch to using a more general RID. For example, change `<RuntimeIdentifier>win10-x64</RuntimeIdentifier>` to `<RuntimeIdentifier>win-x64</RuntimeIdentifier>` in your project file:
1616

1717
```xml
1818
<PropertyGroup>
19-
<NoWarn>$(NoWarn);NETSDK1206</NoWarn>
19+
...
20+
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
2021
</PropertyGroup>
2122
```
2223

23-
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.
24+
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`.
25+
26+
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.
2427

2528
```xml
26-
<ItemGroup>
27-
<RuntimeHostConfigurationOption Include="System.Runtime.Loader.UseRidGraph" Value="true" />
28-
</ItemGroup>
29+
<PropertyGroup>
30+
<UseRidGraph>true</UseRidGraph>
31+
</PropertyGroup>
2932
```

0 commit comments

Comments
 (0)