{"record":{"id":"ed1ba447a76cbe5f","repo":"Unity-Technologies/UnityCsReference","slug":"unsupported-architecture-runtimeinformation-proce-ed1ba4","errorCode":null,"errorMessage":"Unsupported architecture {RuntimeInformation.ProcessArchitecture} on macOS","messagePattern":"Unsupported architecture (.+?) on macOS","errorType":"exception","errorClass":"NotSupportedException","httpStatus":null,"severity":"critical","filePath":"Editor/Mono/Scripting/ScriptCompilation/MsBuild/UnityEditorMSBuildPropsTargetsGeneration.cs","lineNumber":216,"sourceCode":"                    return \"win-x64\";\n                default:\n                    throw new NotSupportedException($\"Unsupported architecture {RuntimeInformation.ProcessArchitecture} on Windows\");\n            }\n        }\n        else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))\n        {\n            return \"linux-x64\";\n        }\n        else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))\n        {\n            switch (RuntimeInformation.ProcessArchitecture)\n            {\n                case Architecture.Arm64:\n                    return \"osx-arm64\";\n                case Architecture.X64:\n                    return \"osx-x64\";\n                default:\n                    throw new NotSupportedException($\"Unsupported architecture {RuntimeInformation.ProcessArchitecture} on macOS\");\n            }\n        }\n\n        throw new NotSupportedException($\"Unsupported OS platform {RuntimeInformation.OSDescription}\");\n    }\n\n    private static string s_cachedUnitySdkVersion;\n\n    // Reads the version from Unity.Sdk.<version>.nupkg so global.json tracks CI's bumped value\n    // (in sdk/UnitySdksCommon.props) instead of a hardcoded literal.\n    private static string GetUnitySdkVersion(string sdkNugetsPath)\n    {\n        if (s_cachedUnitySdkVersion != null)\n            return s_cachedUnitySdkVersion;\n\n        const string prefix = \"Unity.Sdk.\";\n        const string suffix = \".nupkg\";\n","sourceCodeStart":198,"sourceCodeEnd":234,"githubUrl":"https://github.com/Unity-Technologies/UnityCsReference/blob/225b0fbdb57cc17d094e8056b71f8314aba56f73/Editor/Mono/Scripting/ScriptCompilation/MsBuild/UnityEditorMSBuildPropsTargetsGeneration.cs#L198-L234","documentation":"Thrown by GetCurrentDotNETRuntimeId (UnityEditorMSBuildPropsTargetsGeneration.cs:216, NotSupportedException) when running on macOS but RuntimeInformation.ProcessArchitecture is neither Arm64 nor X64. Unity only ships osx-arm64 and osx-x64 RIDs, so any other architecture cannot be mapped and props/targets generation fails.","triggerScenarios":"Running the editor on a macOS machine whose reported process architecture is not Apple Silicon (Arm64) or Intel x64.","commonSituations":"An exotic macOS environment or a misreported architecture under a translation layer / VM.","solutions":["Run Unity Editor on a supported macOS architecture (Apple Silicon Arm64 or Intel x64).","If running under Rosetta or a VM that misreports architecture, run natively so ProcessArchitecture matches the host."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)\n    && RuntimeInformation.ProcessArchitecture is not (Architecture.X64 or Architecture.Arm64))\n{\n    throw new PlatformNotSupportedException(\n        $\"Unity requires macOS x64 or ARM64 (got {RuntimeInformation.ProcessArchitecture}).\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run the editor natively on Apple Silicon or Intel x64 macOS.","If using a VM/translation layer, ensure ProcessArchitecture reports X64 or Arm64.","Fail fast at startup with an architecture check."],"tags":["unity","msbuild","dotnet","architecture","macos","environment"],"backgroundTag":null,"analyzedSha":"225b0fbdb57cc17d094e8056b71f8314aba56f73","analyzedAt":"2026-08-13T19:07:19.849Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}