System.Runtime.InteropServices.RuntimeInformation.OSArchitecture 現在會傳回模擬下的正確值。
先前的行為
先前, RuntimeInformation.OSArchitecture 在 Windows Arm 64 位和 macOS Apple Silicon 系統上的模擬流程中傳回 Architecture.X64。
新行為
從 .NET 7 開始,RuntimeInformation.OSArchitecture 在 Windows Arm 64-bit 和 macOS Apple Silicon 系統上的模擬程序中傳回 Architecture.Arm64。
推出的版本
7 預覽版 6
破壞性變更的類型
這項變更可能會影響 二進位相容性。
變更的原因
先前的行為不正確。
建議的動作
預期程序架構的程式代碼應該改為呼叫RuntimeInformation.ProcessArchitecture。