dotnet/runtime · error · RuntimeError
Unable to find input file in
Error message
Unable to find input file in {original_rsp_filepath} What it means
Raised inside run_nativeaot() in superpmi.py when scanning the ilc.rsp lines yields no input assembly. The loop sets original_input_filepath to the first line not starting with '-'; if none is found (every line is a flag/option), the rsp has no input file and the script cannot proceed.
Solutions
- Open the rsp and confirm there is exactly one line that is a bare path to the input assembly (not prefixed with '-').
- Regenerate the ilc.rsp via the nativeaot build/test infrastructure rather than hand-editing.
- If the input path legitimately starts with '-', escape or rewrite it per ilc conventions.
Example fix
// before (rsp contains only flags, no input line) python superpmi.py collect --nativeaot -ilc_rsps broken.ilc.rsp # 'Unable to find input file in broken.ilc.rsp' // after (ensure rsp has a bare input assembly line, e.g.) // --opt:foo // ComWrappers.dll python superpmi.py collect --nativeaot -ilc_rsps fixed.ilc.rsp
Defensive patterns
Strategy: validation
Validate before calling
with open(rsp_path, encoding="utf-8") as fh:
lines = fh.read().splitlines()
inputs = [ln for ln in lines if ln.strip() and not ln.lstrip().startswith("-")]
if not inputs:
raise SystemExit(f"No input assembly line found in {rsp_path}; rsp is malformed") Prevention
- Treat ilc.rsp as build-generated artifacts; avoid hand-editing.
- Add a CI lint that every ilc.rsp contains exactly one bare input path.
When it happens
Trigger: An ilc.rsp whose lines all begin with '-' (no bare input assembly path), or an empty/malformed rsp where the input assembly line was stripped or never written.
Common situations: Manually edited rsp missing the input assembly; upstream nativeaot build step that generated an incomplete rsp; whitespace/encoding making the input line start with '-' or be skipped.
Related errors
- Expected a '.ilc.rsp' file for nativeaot, but got
- Tiering options have no effect for nativeaot collections.
- Pass only one tiering option.
- Tiering options have no effect for pmi or crossgen2…
- Unsupported OS.
AI-assisted analysis of dotnet/runtime@60108ba66e (2026-08-10).
Data as JSON: /api/errors/333ff11c76c43da1.
Report an issue: GitHub.
Appendix: 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 60108ba66e)