{"record":{"id":"03ce7d27269b7134","repo":"dotnet/runtime","slug":"collection-smoke-tests-is-only-available-for-na","errorCode":null,"errorMessage":"Collection 'smoke_tests' is only available for 'nativeaot' collections.","messagePattern":"Collection 'smoke_tests' is only available for 'nativeaot' collections\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"src/coreclr/scripts/superpmi_collect_setup.py","lineNumber":654,"sourceCode":"        exclude_directories = list(directories_to_ignore)\n        if coreclr_args.collection_name == \"coreclr_tests\":\n            exclude_directories += ['Core_Root']\n\n        exclude_files = list(native_binaries_to_ignore)\n        if coreclr_args.collection_type == \"crossgen2\":\n            print('Adding exclusions for crossgen2')\n            # Currently, trying to crossgen2 R2RTest\\Microsoft.Build.dll causes a pop-up failure, so exclude it.\n            exclude_files += [\"Microsoft.Build.dll\"]\n\n        if coreclr_args.collection_name == \"libraries_tests\":\n            # libraries_tests artifacts contains files from core_root folder. Exclude them.\n            core_root_dir = coreclr_args.core_root_directory\n            exclude_files += [item for item in os.listdir(core_root_dir)\n                              if os.path.isfile(os.path.join(core_root_dir, item)) and (item.endswith(\".dll\") or item.endswith(\".exe\"))]\n\n        if coreclr_args.collection_name == \"smoke_tests\":\n            if coreclr_args.collection_type != \"nativeaot\":\n                raise RuntimeError(\"Collection 'smoke_tests' is only available for 'nativeaot' collections.\")\n\n        if coreclr_args.collection_name == \"corelib\":\n            # corelib is a single-assembly crossgen2 collection over a pre-built\n            # System.Private.CoreLib.dll. The YAML routes InputDirectory to:\n            #   - the wasm-built corelib bin dir (artifacts/bin/coreclr/browser.wasm.Release/IL)\n            #     for wasm cross-target collections, or\n            #   - the host release Core_Root for non-cross-target collections.\n            # Build a custom one-file input directory so the partitioning logic produces\n            # exactly one helix partition. The references crossgen2 needs are resolved\n            # out of the release Core_Root that's part of the correlation payload (see\n            # run_crossgen2 in superpmi.py, which passes -r:<core_root>\\System.*.dll etc.).\n            corelib_src = os.path.join(coreclr_args.input_directory, \"System.Private.CoreLib.dll\")\n            if not os.path.isfile(corelib_src):\n                raise RuntimeError(\"Cannot find System.Private.CoreLib.dll at \" + corelib_src)\n            corelib_input_dir = os.path.join(workitem_payload_directory, \"corelib_input\")\n            os.makedirs(corelib_input_dir, exist_ok=True)\n            copy_files(coreclr_args.input_directory, corelib_input_dir, [corelib_src])\n            coreclr_args.input_directory = corelib_input_dir","sourceCodeStart":636,"sourceCodeEnd":672,"githubUrl":"https://github.com/dotnet/runtime/blob/60108ba66eb7d1d12f595480091b4ad80a24b172/src/coreclr/scripts/superpmi_collect_setup.py#L636-L672","documentation":"Raised by superpmi_collect_setup.py at src/coreclr/scripts/superpmi_collect_setup.py:654 when collection_name is 'smoke_tests' but collection_type is not 'nativeaot'. The smoke_tests collection is only meaningful for NativeAOT compilation.","triggerScenarios":"Configuring a superpmi collection with collection_name=smoke_tests together with collection_type=crossgen2 (or any non-nativeaot type).","commonSituations":"YAML pipeline misconfiguration that reuses a crossgen2 collection_type block for the smoke_tests collection.","solutions":["Set collection_type to 'nativeaot' when using collection_name 'smoke_tests'.","If you need a non-NativeAOT smoke run, choose a different collection_name that supports it."],"exampleFix":"// before\ncollection_name: smoke_tests\ncollection_type: crossgen2\n// after\ncollection_name: smoke_tests\ncollection_type: nativeaot","handlingStrategy":"validation","validationCode":"if coreclr_args.collection_name == 'smoke_tests' and coreclr_args.collection_type != 'nativeaot':\n    raise SystemExit(\"collection 'smoke_tests' requires collection_type='nativeaot'\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Cross-check collection_name against its allowed collection_type in the pipeline YAML before submitting."],"tags":["dotnet","coreclr","superpmi","nativeaot","configuration","pipeline"],"backgroundTag":null,"analyzedSha":"60108ba66eb7d1d12f595480091b4ad80a24b172","analyzedAt":"2026-08-10T18:54:11.478Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}