{"record":{"id":"333ff11c76c43da1","repo":"dotnet/runtime","slug":"unable-to-find-input-file-in-original-rsp-filepat","errorCode":null,"errorMessage":"Unable to find input file in {original_rsp_filepath}","messagePattern":"Unable to find input file in (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"src/coreclr/scripts/superpmi.py","lineNumber":1209,"sourceCode":"                    # The contents of the rsp contain many knobs and arguments that represent customer scenarios.\n                    # Make a copy of the .ilc.rsp file as we are going to modify it. We do not want to modify the original one.\n                    # The modifications include re-writing paths for references, input assembly and the output.\n                    # We do this because the current paths in the rsp *may* not exist by the time we want to run ilc.\n                    rsp_filepath = os.path.join(self.temp_location, make_safe_filename(\"nativeaot_\" + original_rsp_filepath) + \".rsp\")\n                    shutil.copyfile(original_rsp_filepath, rsp_filepath)\n\n                    rsp_file = open(rsp_filepath, \"r\")\n                    rsp_contents = rsp_file.readlines()\n                    rsp_file.close()\n\n                    original_input_filepath = \"\"\n\n                    for line in rsp_contents:\n                        if not line.startswith(\"-\"):\n                            original_input_filepath = line\n\n                    if original_input_filepath == \"\":\n                        raise RuntimeError(f\"Unable to find input file in {original_rsp_filepath}\")\n\n                    input_filename = os.path.basename(original_input_filepath)\n\n                    # The ilc.rsp files are stored in the 'native' folders, ex: 'ComWrappers/ComWrappers/native/ComWrappers.ilc.rsp'\n                    test_native_directory = os.path.abspath(os.path.join(original_rsp_filepath, \"..\")) # ex: 'ComWrappers/ComWrappers/native/'\n                    test_output_directory = os.path.join(test_native_directory, \"..\") # ex: 'ComWrappers/ComWrappers/'\n                    test_directory = os.path.join(test_output_directory, \"..\") # ex: 'ComWrappers/'\n\n                    # The corresponding input assemblies are in the folder above 'native', ex: 'ComWrappers/ComWrappers/'\n                    test_input_filepath = os.path.join(test_output_directory, input_filename)\n\n                    # Blow away references, output, input assembly and directpinvokelist as we are going to use new ones.\n                    rsp_file = open(rsp_filepath, \"w\")\n                    def filter_rsp_argument(line):\n                        if line.startswith(\"-r:\") or line.startswith(\"-o:\") or not line.startswith(\"-\") or line.startswith(\"--directpinvokelist:\"):\n                            return False\n                        else:\n                            return True","sourceCodeStart":1191,"sourceCodeEnd":1227,"githubUrl":"https://github.com/dotnet/runtime/blob/290d5ab72cc1102813fbc0406fb186ceadabc340/src/coreclr/scripts/superpmi.py#L1191-L1227","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"# Ensure each ilc.rsp has a bare (non '-'-prefixed) input-assembly line\nfor rsp in ilc_rsps:\n    with open(rsp) as fh:\n        lines = fh.readlines()\n    if not any(not ln.startswith('-') for ln in lines):\n        raise SystemExit(f'{rsp} has no input assembly line; regenerate it via the native AOT build.')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Regenerate ilc.rsp from a successful NativeAOT build before collecting.","Sanity-check the rsp contains a single bare path line."],"tags":["nativeaot","file-io","superpmi"],"analyzedSha":"290d5ab72cc1102813fbc0406fb186ceadabc340","analyzedAt":"2026-08-06T19:57:01.276Z","schemaVersion":2},"datasetVersion":"2026-08-06T23:17:07.152Z"}