question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

System.InvalidOperationException: No service for type 'Abp.Dependency.IIocResolver' has been registered.

See original GitHub issue

Hi, I’m trying to get a basic application running manually using dotnet core 3.1

added package “Abp.AspNetCore”

inside of startup.cs i’ve added

       public void ConfigureServices(IServiceCollection services)
        {
      
            services.AddAbp<CookieMonsterAbsModule>(
                // Configure Log4Net logging
                options => options.IocManager.IocContainer.AddFacility<LoggingFacility>(
                    f => f.UseAbpLog4Net().WithConfig("log4net.config")
                )
            );

        }

        public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
        {
            app.UseAbp();
           //..
        }

I’ve created a module

using Abp.Modules;
using Abp.Reflection.Extensions;

public class CookieMonsterAbsModule : AbpModule
{
    public override void Initialize()
    {
        IocManager.RegisterAssemblyByConvention(typeof(CookieMonsterAbsModule).GetAssembly());
    }
}

Getting the following error:

System.InvalidOperationException: No service for type ‘Abp.Dependency.IIocResolver’ has been registered.

Any ideas? thanks

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Mantisimocommented, Sep 25, 2020

Hi @maliming,

yeah I figured that was the case. I wanted to really register the framework and just use the webhooks functionality. implement the store classes for example and use that functionality. It seems like this is not possible from what you’re saying. The only reason i’m using the AbpZeroCoreModule is to get passed the No service for type ‘Abp.Dependency.IIocResolver’ issues. I need a module that that registers these initial dependancies. Sounds like I need to use the full project for this.

My reasoning I have an existing product that I wish to expand and leverage some features of Abp but not all.

1reaction
malimingcommented, Sep 25, 2020

hi

Your CookieMonsterAbsModule doesn’t depend on any module.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No service for type <TYPE> has been registered
The problem is to use interface for injection and concrete class to resolve it. services.AddTransient<ICredentialDb, CredentialDb>();.
Read more >
Dependency Injection | Documentation Center | ABP.IO
ABP's Dependency Injection system is developed based on Microsoft's ... There are three common ways of using a service that has already been...
Read more >
Constantly getting "System.InvalidOperationException
I've created a hosted Blazor WASM app that uses Azure AD for authentication and authorization. I am able to login to Azure AD...
Read more >
No Service for Type Microsoft.AspNetCore.Identity ... - YouTube
Fix : No Service for Type Microsoft.AspNetCore.Identity.UserManager has been registered. 6.7K views · 1 year ago ...more ...
Read more >
Dependency Injection
AspNet Boilerplate (ABP) is an open source and well-documented application framework. See the comprehensive tutorials of ABP for technical information.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found