dotnet/runtime · error · RuntimeError
Unknown OS.
Error message
Unknown OS.
What it means
Raised in `determine_superpmi_tool_name` (superpmi.py:3901-3902) when host_os is not osx, linux, or windows. The superpmi binary name (superpmi / superpmi.exe) is only defined for those three; any other host_os has no known superpmi executable name.
Source
Thrown at src/coreclr/scripts/superpmi.py:3902
return None
def determine_superpmi_tool_name(coreclr_args):
""" Determine the superpmi tool name based on the OS
Args:
coreclr_args (CoreclrArguments): parsed args
Return:
(str) Name of the superpmi tool to use
"""
if coreclr_args.host_os == "osx" or coreclr_args.host_os == "linux":
return "superpmi"
elif coreclr_args.host_os == "windows":
return "superpmi.exe"
else:
raise RuntimeError("Unknown OS.")
def determine_superpmi_tool_path(coreclr_args):
""" Determine the superpmi tool full path
Args:
coreclr_args (CoreclrArguments): parsed args
Return:
(str) Path of the superpmi tool to use
"""
superpmi_tool_name = determine_superpmi_tool_name(coreclr_args)
return find_tool(coreclr_args, superpmi_tool_name)
def determine_mcs_tool_name(coreclr_args):
""" Determine the mcs tool name based on the OSView on GitHub (pinned to 290d5ab72c)
Solutions
- Run on a supported host OS (linux, osx, windows) where superpmi is built.
- Do not override host_os to an unsupported value; allow auto-detection.
- If cross-targeting, keep host_os as the supported build host and only set target_os.
Defensive patterns
Strategy: validation
Validate before calling
supported = {'osx', 'linux', 'windows'}
if coreclr_args.host_os not in supported:
raise SystemExit(f'superpmi tool only defined for {sorted(supported)}; got {coreclr_args.host_os}') Prevention
- Run on linux/osx/windows where superpmi is built.
- Let host_os auto-detect rather than overriding it.
When it happens
Trigger: coreclr_args.host_os resolves to a value outside {osx, linux, windows} (e.g. freebsd, illumos, browser, wasi) and a flow needs the superpmi tool name. The OS switch has no case for other platforms.
Common situations: Explicitly setting host/target OS to an unsupported platform; running on an OS where superpmi is not built; cross-compiling to browser/wasi/android targets while invoking superpmi on the host.
Related errors
- Unknown host os: {}
- Tool {tool_name} not found. Have you built the runtime repo
- Unsupported OS.
- Tiering options have no effect for pmi or crossgen2 collecti
- Tiering options have no effect for nativeaot collections.
AI-assisted analysis of dotnet/runtime@290d5ab72c (2026-08-06).
Data as JSON: /api/errors/7f43e02fe2bfb42a.
Report an issue: GitHub.