2025-09-01 12:22:20.227 +00:00 [INF] Starting web host.
2025-09-01 12:22:22.451 +00:00 [FTL] Host terminated unexpectedly!
System.NullReferenceException: Object reference not set to an instance of an object.
at Volo.Abp.DependencyInjection.ConventionalRegistrarBase.IsConventionalRegistrationDisabled(Type type)
at Volo.Abp.DependencyInjection.DefaultConventionalRegistrar.AddType(IServiceCollection services, Type type)
at Volo.Abp.DependencyInjection.ConventionalRegistrarBase.AddTypes(IServiceCollection services, Type[] types)
at Volo.Abp.DependencyInjection.ConventionalRegistrarBase.AddAssembly(IServiceCollection services, Assembly assembly)
at Microsoft.Extensions.DependencyInjection.ServiceCollectionConventionalRegistrationExtensions.AddAssembly(IServiceCollection services, Assembly assembly)
at Volo.Abp.AbpApplicationBase.ConfigureServicesAsync()
at Volo.Abp.AbpApplicationFactory.CreateAsync[TStartupModule](IServiceCollection services, Action1 optionsAction) at Microsoft.Extensions.DependencyInjection.ServiceCollectionApplicationExtensions.AddApplicationAsync[TStartupModule](IServiceCollection services, Action
1 optionsAction)
at Microsoft.Extensions.DependencyInjection.WebApplicationBuilderExtensions.AddApplicationAsync[TStartupModule](WebApplicationBuilder builder, Action`1 optionsAction)
at EHS.Blazor.Program.Main(String[] args) in C:\Users\Chimela\Documents\Projects\EHS\EHS\src\EHS.Blazor\Program.cs:line 42
- Steps to reproduce the issue:
Create new application and run blazor application
3 Answer(s)
-
0
- The error
System.NullReferenceException: Object reference not set to an instance of an object. at Volo.Abp.DependencyInjection.ConventionalRegistrarBase.IsConventionalRegistrationDisabled(Type type)
typically indicates a problem with service registration or module configuration in your ABP Blazor Web App.
To resolve this issue:
- Check for Missing or Incorrect Module Dependencies
- Ensure all your modules have the correct
[DependsOn]
attributes and that no required module is missing. - Example:
- Ensure all your modules have the correct
[DependsOn( typeof(AbpAspNetCoreComponentsModule), typeof(YourProjectEntityFrameworkCoreModule) )] public class YourProjectBlazorModule : AbpModule { }
Review Custom Conventional Registrars
- If you have implemented any custom
IConventionalRegistrar
, verify that they are not returning null or missing required logic.
- If you have implemented any custom
Check for Null Assemblies
- Make sure all referenced assemblies in your solution are present and correctly referenced in the
.csproj
files.
- Make sure all referenced assemblies in your solution are present and correctly referenced in the
Update ABP Packages
- Ensure all ABP NuGet packages are on the same version (
9.1.1
in your case). Mismatched versions can cause registration issues.
- Ensure all ABP NuGet packages are on the same version (
Clean and Rebuild Solution
- Sometimes, a clean and rebuild can resolve assembly loading issues.
Compare with a Fresh ABP Solution
- Generate a new ABP Blazor Web App with the same options and compare the
Program.cs
and module files for differences.
- Generate a new ABP Blazor Web App with the same options and compare the
Check for Known Issues
- Review the ABP 9.2 migration guide and community articles for any related breaking changes or issues:
If the problem persists, try to isolate any recent changes or customizations that could affect dependency injection or module registration.
Sources:
- https://abp.io/docs/9.2/release-info/migration-guides/abp-9-2
- https://abp.io/community/articles/jpq072nh
This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.
- The error
-
0
hi
Can you share your test app via https://wetransfer.com/?
liming.ma@volosoft.com
Thanks
-
0
I have shared the attachment to given email. Below is the link if you have not received it.
https://we.tl/t-pRI9nKEqBr