Finbuckle / Finbuckle.MultiTenant

Finbuckle.MultiTenant is an open-source multitenancy middleware library for .NET. It enables tenant resolution, per-tenant app behavior, and per-tenant data isolation.
https://www.finbuckle.com/multitenant
Apache License 2.0
1.31k stars 267 forks source link

Can't add migration after updating to dotnet 8 #799

Closed anasseb closed 6 months ago

anasseb commented 6 months ago

Hello,

I updated my API from dotnet 6 to dotnet 8, I updated also the Finbuckle references to the latest version. I have no error when building or using the API, but when I want to create a new migration I have this error :

Unable to create a 'DbContext' of type 'ApplicationDbContext'. The exception 'Unable to resolve service for type 'Finbuckle.MultiTenant.ITenantInfo' while attempting to activate 'WebApi.Infrastructure.Persistence.Context.ApplicationDbContext'.' was thrown while attempting to create an instance.

Before updating to dotnet 8 everything was fine.

I searched on the net but can't find any help.

AndrewTriesToCode commented 6 months ago

Hi, can you take a look at my response on #796 and try the design time solution mentioned there?

anasseb commented 6 months ago

Well, I was wrong the error has no link with Finbuckle but I don't know why the compiler say that. Thanks.