Open Closed

Unable to run blazor web app project #9837


User avatar
0
chimelacaesar created

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, Action1 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)
  • User Avatar
    0
    AI-Bot created
    Support Team ABP Agent
    • 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:

    1. Check for Missing or Incorrect Module Dependencies
      • Ensure all your modules have the correct [DependsOn] attributes and that no required module is missing.
      • Example:
    [DependsOn(
             typeof(AbpAspNetCoreComponentsModule),
             typeof(YourProjectEntityFrameworkCoreModule)
         )]
         public class YourProjectBlazorModule : AbpModule
         {
         }
    
    1. Review Custom Conventional Registrars

      • If you have implemented any custom IConventionalRegistrar, verify that they are not returning null or missing required logic.
    2. Check for Null Assemblies

      • Make sure all referenced assemblies in your solution are present and correctly referenced in the .csproj files.
    3. 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.
    4. Clean and Rebuild Solution

      • Sometimes, a clean and rebuild can resolve assembly loading issues.
    5. 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.
    6. Check for Known 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.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you share your test app via https://wetransfer.com/?

    liming.ma@volosoft.com

    Thanks

  • User Avatar
    0
    chimelacaesar created

    I have shared the attachment to given email. Below is the link if you have not received it.

    https://we.tl/t-pRI9nKEqBr

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.0.0-preview. Updated on September 01, 2025, 08:37