egametang/ET · error · Exception
resolve AOT dll:{assemblyName} failed! Please make sure that
Error message
resolve AOT dll:{assemblyName} failed! Please make sure that the AOT project has referenced the dll and generated the trimmed AOT dll correctly. What it means
Thrown by AssemblyResolverBase.ResolveAssembly when TryResolveAssembly fails for an assembly that is NOT in the hot update list (i.e. an AOT/reference assembly) and throwExIfNotFind is true. The message directs the developer to ensure the AOT project references the DLL and that trimmed AOT DLLs were generated correctly.
Source
Thrown at Packages/cn.etetet.hybridclr/Scripts/Editor/Share/Meta/AssemblyResolverBase.cs:25
namespace HybridCLR.Editor.Meta
{
public abstract class AssemblyResolverBase : IAssemblyResolver
{
public string ResolveAssembly(string assemblyName, bool throwExIfNotFind)
{
if (TryResolveAssembly(assemblyName, out string assemblyPath))
{
return assemblyPath;
}
if (throwExIfNotFind)
{
if (SettingsUtil.HotUpdateAssemblyNamesIncludePreserved.Contains(assemblyName))
{
throw new Exception($"resolve Hot update dll:{assemblyName} failed! Please make sure that this hot update dll exists or the search path is configured in the external hot update path.");
}
else
{
throw new Exception($"resolve AOT dll:{assemblyName} failed! Please make sure that the AOT project has referenced the dll and generated the trimmed AOT dll correctly.");
}
}
return null;
}
protected abstract bool TryResolveAssembly(string assemblyName, out string assemblyPath);
}
}
View on GitHub (pinned to 5cab01f7a8)
Solutions
- Re-run HybridCLR/Generate/AotDlls to produce a fresh, complete set of trimmed AOT assemblies.
- If a needed assembly is being stripped away, add a <preserve> entry to link.xml or mark the assembly/type with [Preserve].
- Ensure the AOT resolver's search directories include the strip output path and any additional AOT reference directories.
- Confirm the project actually references the missing assembly in its .asmdef or .csproj so it appears in the IL2CPP build.
Defensive patterns
Strategy: validation
Validate before calling
// Verify all referenced AOT assemblies resolve before generation
var aotResolver = MetaUtil.CreateAOTAssemblyResolver(EditorUserBuildSettings.activeBuildTarget);
foreach (var refName in requiredAotRefs)
{
if (string.IsNullOrEmpty(aotResolver.ResolveAssembly(refName, false)))
Debug.LogError("AOT DLL " + refName + " missing from strip output.");
} Prevention
- Keep link.xml up to date with [Preserve] attributes or assembly-level preserve entries for any type referenced by hot update code.
- Regenerate AOT DLLs after any dependency change.
- Audit third-party plugin assemblies to ensure they appear in the AOT reference set.
When it happens
Trigger: ResolveAssembly(name, true) where name is not a hot update assembly. Typically invoked during AOT analysis or method-bridge generation when the resolver cannot locate a referenced AOT assembly in the stripped AOT output directory.
Common situations: AOT DLLs were stripped incompletely (a referenced assembly was excluded by link.xml); the AOT strip step used a stale build that did not include the assembly; the assembly is a third-party plugin not referenced by the main Assembly-CSharp; Unity version change invalidated cached AOT DLLs.
Related errors
- type:{typeSig} definition could not be found. Please try `Hy
- hot update assembly:{hotUpdateDllName} doesn't exist
- no aot assembly found. please run `HybridCLR/Generate/All` o
- no aot assembly found. please run `HybridCLR/Generate/All` o
- GenerateStripedAOTDlls failed
AI-assisted analysis of egametang/ET@5cab01f7a8 (2026-08-13).
Data as JSON: /api/errors/2c0d1072ae65076a.
Report an issue: GitHub.