Skip to content

Update netsdk1206.md to match the breaking change document #45941

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions docs/core/tools/sdk-errors/netsdk1206.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,19 @@

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&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:

Check failure on line 15 in docs/core/tools/sdk-errors/netsdk1206.md

View workflow job for this annotation

GitHub Actions / lint

Inline HTML

docs/core/tools/sdk-errors/netsdk1206.md:15:223 MD033/no-inline-html Inline HTML [Element: RuntimeIdentifier] https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md033.md

Check failure on line 15 in docs/core/tools/sdk-errors/netsdk1206.md

View workflow job for this annotation

GitHub Actions / lint

Inline HTML

docs/core/tools/sdk-errors/netsdk1206.md:15:275 MD033/no-inline-html Inline HTML [Element: RuntimeIdentifier] https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md033.md
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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:
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:


```xml
<PropertyGroup>
<NoWarn>$(NoWarn);NETSDK1206</NoWarn>
...
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
</PropertyGroup>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this is missing the paragraph from the breaking change document that starts "If you specify the RID as a command-line argument, make a similar change." I think that would be good to include here too.

```

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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
<ItemGroup>
<RuntimeHostConfigurationOption Include="System.Runtime.Loader.UseRidGraph" Value="true" />
</ItemGroup>
<PropertyGroup>
<UseRidGraph>true</UseRidGraph>
</PropertyGroup>
```
Loading