abpframework/abp · critical · AbpException
Could not get module types from assembly: {assembly.FullName
Error message
Could not get module types from assembly: {assembly.FullName} What it means
Thrown by FilePlugInSource when assembly.GetTypes() raises (typically a ReflectionTypeLoadException) while scanning a plug-in assembly for ABP module types. The original exception is wrapped as AbpException (InnerException preserved) and the offending assembly FullName is named. It means the plug-in assembly could not be introspected.
Source
Thrown at framework/src/Volo.Abp.Core/Volo/Abp/Modularity/PlugIns/FilePlugInSource.cs:36
var modules = new List<Type>();
foreach (var filePath in FilePaths)
{
var assembly = AssemblyLoadContext.Default.LoadFromAssemblyPath(filePath);
try
{
foreach (var type in assembly.GetTypes())
{
if (AbpModule.IsAbpModule(type))
{
modules.AddIfNotContains(type);
}
}
}
catch (Exception ex)
{
throw new AbpException("Could not get module types from assembly: " + assembly.FullName, ex);
}
}
return modules.ToArray();
}
}
View on GitHub (pinned to 7ed43b1931)
Solutions
- Inspect ex.InnerException (ReflectionTypeLoadException.LoaderExceptions) to find the missing assembly/type.
- Deploy all of the plug-in's dependencies alongside it in the probing path.
- Rebuild the plug-in against the same ABP and target-framework version as the host.
- If the assembly is not meant to be a plug-in, remove it from the plug-in source.
Defensive patterns
Strategy: try-catch
Validate before calling
// Before scanning, verify the assembly loads cleanly:
static bool CanLoadTypes(string path)
{
try { return Assembly.LoadFrom(path).GetTypes().Length >= 0; }
catch { return false; }
} Try / catch
try { var modules = plugInSource.GetModules(); }
catch (AbpException ex)
{
var loadEx = ex.InnerException as ReflectionTypeLoadException;
foreach (var le in loadEx?.LoaderExceptions ?? Array.Empty<Exception>())
logger.LogCritical(le, "Plug-in loader error");
} Prevention
- Deploy all plug-in dependencies in the probing path.
- Build plug-ins against the same ABP/framework version as the host.
- Load-test the plug-in assembly in isolation before adding it as a source.
When it happens
Trigger: Adding a plug-in via AddFile / a FilePlugInSource whose DLL fails GetTypes() — missing dependency, mismatched framework target, or a type with a missing base class.
Common situations: A plug-in built against a different ABP/framework version, a plug-in whose dependency DLL is not in the probing path, or a .NET Standard vs .NET Core target mismatch.
Related errors
- Could not get module types from assembly: {assembly.FullName
- Given type is not an ABP module: {moduleType.AssemblyQualifi
- Given module instance ({instance.GetType().AssemblyQualified
- Could not find a depended module {dependedModuleType.Assembl
- ServiceConfigurationContext is only available in the Configu
AI-assisted analysis of abpframework/abp@7ed43b1931 (2026-08-13).
Data as JSON: /api/errors/1b1fd3972bd7c3e3.
Report an issue: GitHub.