C#C
C#17mo ago
Tiltyboi

EF-Core migrations issue

I have split a large project into multiple places. I have 1 class-library with my classes and contexts, 1 class library where my migrations will go and then my main app.
When i do Add-Migration init -Project <lib-with-context> it throws this lovely error:

Unable to create a 'DbContext' of type ''. The exception 'Unable to resolve service for type 'Microsoft.EntityFrameworkCore.DbContextOptions`1[SadBot.Core.Database.RPGContext]' while attempting to activate 'SadBot.Core.Database.RPGContext'.' was thrown while attempting to create an instance. For the different patterns supported at design time, see https://go.microsoft.com/fwlink/?linkid=851728
Was this page helpful?