{"record":{"id":"5c58e6cff292eb6f","repo":"egametang/ET","slug":"no-aot-assembly-found-please-run-hybridclr-gener","errorCode":null,"errorMessage":"no aot assembly found. please run `HybridCLR/Generate/All` or `HybridCLR/Generate/AotDlls` to generate aot dlls before runing `HybridCLR/Generate/AOTGenericReference`","messagePattern":"no aot assembly found\\. please run `HybridCLR/Generate/All` or `HybridCLR/Generate/AotDlls` to generate aot dlls before runing `HybridCLR/Generate/AOTGenericReference`","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"Packages/cn.etetet.hybridclr/Scripts/Editor/Share/Commands/AOTReferenceGeneratorCommand.cs","lineNumber":84,"sourceCode":"            List<string> hotUpdateDllNames = SettingsUtil.HotUpdateAssemblyNamesExcludePreserved;\n\n            AssemblyReferenceDeepCollector hotUpdateCollector = new AssemblyReferenceDeepCollector(MetaUtil.CreateHotUpdateAndAOTAssemblyResolver(target, hotUpdateDllNames), hotUpdateDllNames);\n            var hotUpdateAnalyzer = new Analyzer(new Analyzer.Options\n            {\n                MaxIterationCount = Math.Min(10, gs.maxGenericReferenceIteration),\n                Collector = hotUpdateCollector,\n            });\n\n            hotUpdateAnalyzer.Run();\n\n\n            string aotDllDir = SettingsUtil.GetAssembliesPostIl2CppStripDir(target);\n            List<string> aotAssemblyNames = Directory.Exists(aotDllDir) ?\n                Directory.GetFiles(aotDllDir, \"*.dll\", SearchOption.TopDirectoryOnly).Select(Path.GetFileNameWithoutExtension).ToList()\n                : new List<string>();\n            if (aotAssemblyNames.Count == 0)\n            {\n                throw new Exception($\"no aot assembly found. please run `HybridCLR/Generate/All` or `HybridCLR/Generate/AotDlls` to generate aot dlls before runing `HybridCLR/Generate/AOTGenericReference`\");\n            }\n            AssemblyReferenceDeepCollector aotCollector = new AssemblyReferenceDeepCollector(MetaUtil.CreateAOTAssemblyResolver(target), aotAssemblyNames);\n            var aotAnalyzer = new Analyzer(new Analyzer.Options\n            {\n                MaxIterationCount = Math.Min(10, gs.maxGenericReferenceIteration),\n                Collector = aotCollector,\n                ComputeAotAssembly = true,\n            });\n\n            aotAnalyzer.Run();\n\n            var (resultTypes, resultMethods) = ExcludeExistAOTGenericTypeAndMethodss(hotUpdateAnalyzer.AotGenericTypes.ToList(), hotUpdateAnalyzer.AotGenericMethods.ToList(), aotAnalyzer.AotGenericTypes.ToList(), aotAnalyzer.AotGenericMethods.ToList());\n            var writer = new GenericReferenceWriter();\n            writer.Write(resultTypes, resultMethods, $\"{Application.dataPath}/{gs.outputAOTGenericReferenceFile}\");\n            AssetDatabase.Refresh();\n        }\n\n","sourceCodeStart":66,"sourceCodeEnd":102,"githubUrl":"https://github.com/egametang/ET/blob/5cab01f7a8bee5f49f4781eebe9e2b1c6d7ebe0f/Packages/cn.etetet.hybridclr/Scripts/Editor/Share/Commands/AOTReferenceGeneratorCommand.cs#L66-L102","documentation":"Thrown by AOTReferenceGeneratorCommand when the post-IL2CPP-strip AOT DLL output directory is empty or missing. The AOT generic reference analysis step needs the trimmed AOT assemblies to compute which generic instantiations must be pre-generated. Without them the analysis cannot run.","triggerScenarios":"Running the menu HybridCLR/Generate/AOTGenericReference (or Generate/All) when SettingsUtil.GetAssembliesPostIl2CppStripDir(target) either does not exist or contains zero *.dll files. The code does Directory.GetFiles on that dir; an empty result triggers the exception.","commonSituations":"First-time setup where AOT DLLs have never been stripped; the strip step failed silently in a previous run; the project was cleaned (Library folder wiped) after the last successful strip; switching build targets without re-stripping.","solutions":["Run HybridCLR/Generate/AotDlls (or HybridCLR/Generate/All which runs strip first) to produce the trimmed AOT assemblies for the current build target.","Confirm the active build target matches the one you intend to ship -- AOT DLLs are target-specific and are stored under a per-target subdirectory.","Verify the strip output directory (typically under HybridCLRData/AssembliesPostIl2CppStrip/<target>) is writable and not excluded by .gitignore after a clean checkout on CI."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"string aotDir = SettingsUtil.GetAssembliesPostIl2CppStripDir(EditorUserBuildSettings.activeBuildTarget);\nbool hasAot = Directory.Exists(aotDir) && Directory.GetFiles(aotDir, \"*.dll\").Length > 0;\nif (!hasAot) Debug.LogError(\"AOT DLLs missing -- run HybridCLR/Generate/AotDlls first.\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always run Generate/All instead of individual steps unless you explicitly order them.","On CI, verify the strip output directory is non-empty before proceeding to generic-reference generation.","Cache the HybridCLRData strip output across CI runs to avoid re-stripping, but invalidate the cache when the build target or Unity version changes."],"tags":["hybridclr","aot","code-generation","setup"],"backgroundTag":null,"analyzedSha":"5cab01f7a8bee5f49f4781eebe9e2b1c6d7ebe0f","analyzedAt":"2026-08-13T21:10:40.377Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}