Edit

Share via


RuntimeInformation.RuntimeIdentifier Property

Definition

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

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

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