Skip to content

Update note about RuntimeInformation.RuntimeIdentifier being based on the build #11203

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

Merged
merged 1 commit into from
Apr 18, 2025
Merged
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
4 changes: 2 additions & 2 deletions xml/System.Runtime.InteropServices/RuntimeInformation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -364,9 +364,9 @@ It's not recommended to parse the string for information.

## Remarks

.NET 8 and later versions: This property returns a string that identifies the operating system and processor architecture for which the runtime was built. For example, the value on Windows 11 is `win-x64`, and on Ubuntu 20.04, it's `linux-x64`.
.NET 8 and later versions: This property returns a string that identifies the operating system and processor architecture for which the runtime was built. For example, the value on Windows 11 is `win-x64`, and on Debian 12, it's `linux-x64`. Since this value represents the platform for which the runtime was built, it may differ depending on the installation source. Microsoft-built runtimes use [portable RIDs](https://github.com/dotnet/runtime/blob/main/src/libraries/Microsoft.NETCore.Platforms/src/PortableRuntimeIdentifierGraph.json) like `linux-x64` that can run on multiple Linux distributions. However, some Linux distributions [provide their own packages](/dotnet/core/install/linux#packages) built specifically for that distribution and version, which may return more specific RIDs like `ubuntu.24.10-x64`.

.NET 7 and earlier versions: This property returns a string that identifies the platform (operating system, version, and processor architecture) on which the current process is running. For example, when running an application on Windows 11, the value is `win10-x64`, and on Ubuntu 20.04, it can be `ubuntu.20.04-x64`.
.NET 7 and earlier versions: This property returns a string that identifies the platform (operating system, version, and processor architecture) on which the current process is running. For example, when running an application on Windows 11, the value is `win10-x64`, and on Debian 12, it can be `debian.12-x64`.

Since this string is opaque, it's not recommended to parse the string into its constituent parts.

Expand Down