Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
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
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;
using System.Runtime.InteropServices;
using Microsoft.DotNet.PlatformAbstractions.Native;

namespace Microsoft.DotNet.PlatformAbstractions
Expand All @@ -23,7 +24,7 @@ private static string GetArch()
#if NET45
return Environment.Is64BitProcess ? "x64" : "x86";
#else
return IntPtr.Size == 8 ? "x64" : "x86";
return RuntimeInformation.ProcessArchitecture.ToString().ToLowerInvariant();
#endif
}

Expand All @@ -36,11 +37,7 @@ public static string GetRuntimeIdentifier()

private static string GetRIDArch()
{
if (!string.IsNullOrEmpty(RuntimeArchitecture))
{
return $"-{RuntimeArchitecture.ToLowerInvariant()}";
}
return string.Empty;
return $"-{RuntimeArchitecture}";
}

private static string GetRIDVersion()
Expand Down