模擬下的 RuntimeInformation.OSArchitecture

System.Runtime.InteropServices.RuntimeInformation.OSArchitecture 現在會在模擬下傳回正確的值。

先前的行為

先前,在 Windows Arm 64 位元和 macOS Apple Silicon 系統上的模擬處理序中,RuntimeInformation.OSArchitecture 會傳回 Architecture.X64

新的行為

從 .NET 7 開始,在 Windows Arm 64 位元和 macOS Apple Silicon 系統上的模擬處理序中,RuntimeInformation.OSArchitecture 會傳回 Architecture.Arm64

導入的版本

7 Preview 6

中斷性變更的類型

這項變更會影響二進位相容性

變更原因

先前的行為不正確。

預期處理序架構的程式碼應該要變更為改為呼叫 RuntimeInformation.ProcessArchitecture

受影響的 API