From 3c4e2cf0e37dd90ba954416231fe0b30e8b431ca Mon Sep 17 00:00:00 2001 From: Elinor Fung Date: Thu, 17 Apr 2025 15:21:22 -0700 Subject: [PATCH] Update note about RuntimeInformation.RuntimeIdentifier being based on the build --- xml/System.Runtime.InteropServices/RuntimeInformation.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xml/System.Runtime.InteropServices/RuntimeInformation.xml b/xml/System.Runtime.InteropServices/RuntimeInformation.xml index a581d7ed88d..096221e3726 100644 --- a/xml/System.Runtime.InteropServices/RuntimeInformation.xml +++ b/xml/System.Runtime.InteropServices/RuntimeInformation.xml @@ -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.