Open Closed

Module template depends indirectly on Administration and Service project #3984


User avatar
0
ivanosw1 created

If you're creating a bug/problem report, please include followings:

  • ABP Framework version: v6.0.0
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace: The requested service 'Volo.Abp.AspNetCore.MultiTenancy.MultiTenancyMiddleware' has not been registered
  • Steps to reproduce the issue:"
  1. Crete a standard microservice solution.
  2. Create a new stand alone module template. This module don't reference anything from the microservice solution created ad point 1 and works fine.
  3. I want to use the On-The-Fly-Migrations and so following this guide https://docs.abp.io/en/commercial/latest/startup-templates/microservice/database-migrations#auto-migration-on-the-fly-migration and also https://docs.abp.io/en/commercial/latest/startup-templates/microservice/microservices I noticed that the microservice doesn't depends only on SharedHostingMicroservicesModule (which contains configuration helpers for JwtBearer authorization, Swagger and DbMigrations) , but also on SassService.EntityFrameworkCore and AdministrationService.EntityFrameworkCore and other cascading projects

I don't think this reference should be in my module (I don't need at all)

So instead of reference, I have copied all the stuff needed by On-The-Fly-Migration (PendingChecker, DatabaseHandlerBase, JwtConfigurer, and so on).
The solution build succesfully but on start I have the error mentioned above. The requested service 'Volo.Abp.AspNetCore.MultiTenancy.MultiTenancyMiddleware' has not been registered

So, I think there is a problem of hidden reference and initialization made by some project in the microservice solution The goal is to develop, build and deploy autonomous modules using on-the-fly-migrations and no references on others projects, otherwise we have not a very independent microservice.

Can you check this?

Thank you.


2 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Is your problem solved? I see that question is closed.

  • User Avatar
    0
    ivanosw1 created

    Yes, the problem is exactly what I have described and you can investigate further if you want. l have resolved for my needs.

    Thank you

Made with ❤️ on ABP v9.1.0-preview. Updated on November 11, 2024, 11:11