RuntimeInformation.RuntimeIdentifier Property
Definition
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
.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
Feedback
https://aka.ms/ContentUserFeedback.
Binnenkort: Gedurende 2024 worden GitHub Issues uitgefaseerd als het feedbackmechanisme voor inhoud. Dit wordt vervangen door een nieuw feedbacksysteem. Ga voor meer informatie naar:Feedback verzenden en bekijken voor