Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

RuntimeInformation.RuntimeIdentifier Property

Definition

Namespace:
System.Runtime.InteropServices
Assemblies:
netstandard.dll, System.Runtime.dll
Assemblies:
netstandard.dll, System.Runtime.InteropServices.RuntimeInformation.dll
Source:
RuntimeInformation.cs
Source:
RuntimeInformation.cs
Source:
RuntimeInformation.cs
Source:
RuntimeInformation.cs
Source:
RuntimeInformation.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Gets the platform for which the runtime was built (or on which an app is running).

public:
 static property System::String ^ RuntimeIdentifier { System::String ^ get(); };
public static string RuntimeIdentifier { get; }
static member RuntimeIdentifier : string
Public Shared ReadOnly Property RuntimeIdentifier As String

Property Value

An opaque string that identifies the platform for which the runtime was built (or on which an app is running).

Remarks

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 like linux-x64 that can run on multiple Linux distributions. However, some Linux distributions provide their own packages built specifically for that distribution and version, which may return more specific RIDs like ubuntu.24.10-x64.

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

For more information, see .NET RID catalog.

Applies to


Feedback

Was this page helpful?