dotnet/runtime · error · RuntimeError

Error

Error message

Error

What it means

Raised by setup_args in jitrollingbuild.py for the 'upload' subcommand. After argument parsing, it checks `if not os.path.isdir(coreclr_args.product_location)`; if the built-product directory cannot be found it logs 'Built product location could not be determined' and raises RuntimeError("Error"). This is a guard before upload tries to read JIT binaries from product_location.

Solutions

  1. Build the CLR product so the product directory exists (e.g. `build.cmd clr+libs -arch x64 -c Checked`).
  2. Pass -core_root explicitly pointing at a valid Core_Root that contains the product binaries.
  3. Verify the directory with `ls <product_location>` and fix the path/repo root.

Example fix

// before
python jitrollingbuild.py upload -git_hash abc   # product_location missing -> 'Error'
// after
build.cmd clr+libs -arch x64 -c Checked
python jitrollingbuild.py upload -git_hash abc
Defensive patterns

Strategy: validation

Validate before calling

import os
if not os.path.isdir(product_location):
    raise SystemExit(f"product_location does not exist: {product_location}; build clr+libs first")

Prevention

When it happens

Trigger: Running upload when the product_location (derived from core_root / repo layout, or passed explicitly) does not exist on disk — e.g. no build was done, or -core_root points at a non-existent path.

Common situations: Skipping the build step; wrong repo root; CORE_ROOT environment variable pointing at a stale or cleaned directory; running on a fresh clone.

Related errors


AI-assisted analysis of dotnet/runtime@60108ba66e (2026-08-10). Data as JSON: /api/errors/a9cd58ef3f96c987. Report an issue: GitHub.

Appendix: source

Thrown at src/coreclr/scripts/jitrollingbuild.py:636

        coreclr_args.verify(args,
                            "git_hash",
                            lambda unused: True,
                            "Unable to set git_hash")

        coreclr_args.verify(args,
                            "use_latest_jit_change",
                            lambda unused: True,
                            "Unable to set use_latest_jit_change")

        coreclr_args.verify(args,
                            "skip_cleanup",
                            lambda unused: True,
                            "Unable to set skip_cleanup")

        if not os.path.isdir(coreclr_args.product_location):
            logging.error("Built product location could not be determined")
            raise RuntimeError("Error")

    elif coreclr_args.mode == "download":

        coreclr_args.verify(args,
                            "git_hash",
                            lambda unused: True,
                            "Unable to set git_hash")

        coreclr_args.verify(args,
                            "target_dir",
                            lambda unused: True,
                            "Unable to set target_dir")

        coreclr_args.verify(args,
                            "skip_cleanup",
                            lambda unused: True,
                            "Unable to set skip_cleanup")

View on GitHub (pinned to 60108ba66e)