dotnet/runtime · error · RuntimeError
Unable to find input file in {original_rsp_filepath}
Error message
Unable to find input file in {original_rsp_filepath} What it means
Raised in `run_nativeaot` (superpmi.py:1202-1209) after the ilc.rsp is copied and read. The code scans the rsp lines for the first one not starting with `-` (the input assembly line); if none is found it raises this error. A well-formed ilc.rsp always contains exactly one bare input-assembly line, so its absence means the file is malformed or empty.
Source
Thrown at src/coreclr/scripts/superpmi.py:1209
# The contents of the rsp contain many knobs and arguments that represent customer scenarios.
# Make a copy of the .ilc.rsp file as we are going to modify it. We do not want to modify the original one.
# The modifications include re-writing paths for references, input assembly and the output.
# We do this because the current paths in the rsp *may* not exist by the time we want to run ilc.
rsp_filepath = os.path.join(self.temp_location, make_safe_filename("nativeaot_" + original_rsp_filepath) + ".rsp")
shutil.copyfile(original_rsp_filepath, rsp_filepath)
rsp_file = open(rsp_filepath, "r")
rsp_contents = rsp_file.readlines()
rsp_file.close()
original_input_filepath = ""
for line in rsp_contents:
if not line.startswith("-"):
original_input_filepath = line
if original_input_filepath == "":
raise RuntimeError(f"Unable to find input file in {original_rsp_filepath}")
input_filename = os.path.basename(original_input_filepath)
# The ilc.rsp files are stored in the 'native' folders, ex: 'ComWrappers/ComWrappers/native/ComWrappers.ilc.rsp'
test_native_directory = os.path.abspath(os.path.join(original_rsp_filepath, "..")) # ex: 'ComWrappers/ComWrappers/native/'
test_output_directory = os.path.join(test_native_directory, "..") # ex: 'ComWrappers/ComWrappers/'
test_directory = os.path.join(test_output_directory, "..") # ex: 'ComWrappers/'
# The corresponding input assemblies are in the folder above 'native', ex: 'ComWrappers/ComWrappers/'
test_input_filepath = os.path.join(test_output_directory, input_filename)
# Blow away references, output, input assembly and directpinvokelist as we are going to use new ones.
rsp_file = open(rsp_filepath, "w")
def filter_rsp_argument(line):
if line.startswith("-r:") or line.startswith("-o:") or not line.startswith("-") or line.startswith("--directpinvokelist:"):
return False
else:
return TrueView on GitHub (pinned to 290d5ab72c)
Solutions
- Rebuild the native AOT test to regenerate a complete ilc.rsp with its input assembly line.
- Open the rsp and confirm there is exactly one line not starting with `-` (the input assembly path).
- Re-run the upstream ilc/NativeAOT generation step that emits the rsp and retry the collection.
Defensive patterns
Strategy: validation
Validate before calling
# Ensure each ilc.rsp has a bare (non '-'-prefixed) input-assembly line
for rsp in ilc_rsps:
with open(rsp) as fh:
lines = fh.readlines()
if not any(not ln.startswith('-') for ln in lines):
raise SystemExit(f'{rsp} has no input assembly line; regenerate it via the native AOT build.') Prevention
- Regenerate ilc.rsp from a successful NativeAOT build before collecting.
- Sanity-check the rsp contains a single bare path line.
When it happens
Trigger: The ilc.rsp at the given path has every line prefixed with `-` (only switches, no input assembly), or the file is effectively empty of a bare path line. This can happen with a truncated/generated rsp or a stale/overwritten rsp.
Common situations: An incompletely generated ilc.rsp from a failed previous native AOT build; a hand-edited rsp where the input line was removed; an rsp produced by a different toolchain version with a different layout.
Related errors
- Expected a '.ilc.rsp' file for nativeaot, but got {original_
- Tiering options have no effect for nativeaot collections.
- No .mc files generated.
- PMI not found at {}
- Collection 'smoke_tests' is only available for 'nativeaot' c
AI-assisted analysis of dotnet/runtime@290d5ab72c (2026-08-06).
Data as JSON: /api/errors/333ff11c76c43da1.
Report an issue: GitHub.