dotnet/runtime · error · RuntimeError
Core_Root not set properly
Error message
Core_Root not set properly
What it means
Raised at the top of `determine_coredistools` (superpmi.py:3749-3750). coredistools (the native disassembler used for asm diffs) is resolved relative to Core_Root, so if coreclr_args has no `core_root` attribute or it is None, the function cannot proceed and aborts. Core_Root is the built runtime output directory.
Source
Thrown at src/coreclr/scripts/superpmi.py:3750
""" Determine the coredistools location in one of several locations:
1. First, look in Core_Root. It will be there if the setup-stress-dependencies.cmd/sh
script has been run, which is typically only if tests have been run.
2. The build appears to restore it and put it in the R2RDump sub-directory. Look there.
Copy it to the Core_Root directory if found.
3. If unable to find coredistools, download it from a cached
copy in the CLRJIT Azure Storage. (Ideally, we would instead download the NuGet
package and extract it using the same mechanism as setup-stress-dependencies
instead of having our own copy in Azure Storage).
Args:
coreclr_args (CoreclrArguments) : parsed args
Returns:
coredistools_location (str) : path of [lib]coredistools.dylib|so|dll
"""
if not hasattr(coreclr_args, "core_root") or coreclr_args.core_root is None:
raise RuntimeError("Core_Root not set properly")
coredistools_dll_name = None
if coreclr_args.host_os.lower() == "osx":
coredistools_dll_name = "libcoredistools.dylib"
elif coreclr_args.host_os.lower() == "linux":
coredistools_dll_name = "libcoredistools.so"
elif coreclr_args.host_os.lower() == "windows":
coredistools_dll_name = "coredistools.dll"
else:
raise RuntimeError("Unknown host os: {}".format(coreclr_args.host_os))
coredistools_location = os.path.join(coreclr_args.core_root, coredistools_dll_name)
if os.path.isfile(coredistools_location):
logging.info("Using coredistools found at %s", coredistools_location)
else:
coredistools_r2rdump_location = os.path.join(coreclr_args.core_root, "R2RDump", coredistools_dll_name)
if os.path.isfile(coredistools_r2rdump_location):
logging.info("Using coredistools found at %s (copying to %s)", coredistools_r2rdump_location, coredistools_location)View on GitHub (pinned to 290d5ab72c)
Solutions
- Pass `-core_root <path-to-built-runtime>` explicitly on the command line.
- Run from within a runtime repo checkout so Core_Root can be deduced, or run the build step that creates Core_Root first.
- If doing a product-build-only diff, ensure the product location/Core_Root is created by the runtime build.
Example fix
// before superpmi.py asmdiffs -mch_files foo.mch ... // after superpmi.py asmdiffs -core_root artifacts/bin/coreclr/windows.x64.Debug -mch_files foo.mch ...
Defensive patterns
Strategy: validation
Validate before calling
# Require a usable Core_Root before any coredistools-dependent flow
core_root = getattr(coreclr_args, 'core_root', None)
if not core_root:
raise SystemExit('Core_Root not set; pass -core_root <path> or run inside a runtime repo checkout.') Prevention
- Always pass -core_root for asm diffs in non-repo contexts.
- Run from within a runtime repo checkout to enable deduction.
When it happens
Trigger: Invoking an asmdiffs/replay path that needs coredistools without a resolvable Core_Root: `-core_root` not passed AND not deducible from the runtime repo layout. The check fires before any OS-specific coredistools lookup.
Common situations: Running outside a runtime repo checkout with no explicit `-core_root`; running on a machine where the repo root deduction fails; invoking asm diffs against only a standalone clrjit without a Core_Root.
Related errors
- Specified -base_jit_path does not point to a file
- Pass only one tiering option.
- Couldn't create git diff
- Unknown host os: {}
- PMI not found at {}
AI-assisted analysis of dotnet/runtime@290d5ab72c (2026-08-06).
Data as JSON: /api/errors/672358f43c5811eb.
Report an issue: GitHub.