egametang/ET · error · Exception
no aot assembly found. please run `HybridCLR/Generate/All` o
Error message
no aot assembly found. please run `HybridCLR/Generate/All` or `HybridCLR/Generate/AotDlls` to generate aot dlls before runing `HybridCLR/Generate/AOTGenericReference`
What it means
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.
Source
Thrown at Packages/cn.etetet.hybridclr/Scripts/Editor/Share/Commands/AOTReferenceGeneratorCommand.cs:84
List<string> hotUpdateDllNames = SettingsUtil.HotUpdateAssemblyNamesExcludePreserved;
AssemblyReferenceDeepCollector hotUpdateCollector = new AssemblyReferenceDeepCollector(MetaUtil.CreateHotUpdateAndAOTAssemblyResolver(target, hotUpdateDllNames), hotUpdateDllNames);
var hotUpdateAnalyzer = new Analyzer(new Analyzer.Options
{
MaxIterationCount = Math.Min(10, gs.maxGenericReferenceIteration),
Collector = hotUpdateCollector,
});
hotUpdateAnalyzer.Run();
string aotDllDir = SettingsUtil.GetAssembliesPostIl2CppStripDir(target);
List<string> aotAssemblyNames = Directory.Exists(aotDllDir) ?
Directory.GetFiles(aotDllDir, "*.dll", SearchOption.TopDirectoryOnly).Select(Path.GetFileNameWithoutExtension).ToList()
: new List<string>();
if (aotAssemblyNames.Count == 0)
{
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`");
}
AssemblyReferenceDeepCollector aotCollector = new AssemblyReferenceDeepCollector(MetaUtil.CreateAOTAssemblyResolver(target), aotAssemblyNames);
var aotAnalyzer = new Analyzer(new Analyzer.Options
{
MaxIterationCount = Math.Min(10, gs.maxGenericReferenceIteration),
Collector = aotCollector,
ComputeAotAssembly = true,
});
aotAnalyzer.Run();
var (resultTypes, resultMethods) = ExcludeExistAOTGenericTypeAndMethodss(hotUpdateAnalyzer.AotGenericTypes.ToList(), hotUpdateAnalyzer.AotGenericMethods.ToList(), aotAnalyzer.AotGenericTypes.ToList(), aotAnalyzer.AotGenericMethods.ToList());
var writer = new GenericReferenceWriter();
writer.Write(resultTypes, resultMethods, $"{Application.dataPath}/{gs.outputAOTGenericReferenceFile}");
AssetDatabase.Refresh();
}
View on GitHub (pinned to 5cab01f7a8)
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.
Defensive patterns
Strategy: validation
Validate before calling
string aotDir = SettingsUtil.GetAssembliesPostIl2CppStripDir(EditorUserBuildSettings.activeBuildTarget);
bool hasAot = Directory.Exists(aotDir) && Directory.GetFiles(aotDir, "*.dll").Length > 0;
if (!hasAot) Debug.LogError("AOT DLLs missing -- run HybridCLR/Generate/AotDlls first."); Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- no aot assembly found. please run `HybridCLR/Generate/All` o
- You have not initialized HybridCLR, please install it via me
- GenerateStripedAOTDlls failed
- resolve AOT dll:{assemblyName} failed! Please make sure that
- type:{a} definition could not be found
AI-assisted analysis of egametang/ET@5cab01f7a8 (2026-08-13).
Data as JSON: /api/errors/5c58e6cff292eb6f.
Report an issue: GitHub.