Search code examples
.netentity-frameworkasp.net-corecode-first

EF Core Code First Migrations not recognising existing Migrations


A picture paints a thousand words...

I have existing migrations, but when I try to add a new migration I get this error: "No migration configuration type was found in the assembly..."

I am using Microsoft.NETCore.APP 3.1.0,

Packages installed: Entity Framework 6.4.4, MicroSoft.EntityFrameworkCore.Design 5.0.5, MicroSoft.EntityFrameworkCore.SQLServer 5.0.5, MicroSoft.EntityFrameworkCore.Tools 5.0.5

Thanks in anticipation

enter image description here


Solution

  • Install Microsoft.EntityFrameworkCore.Tools.

    By the way, you are using Microsoft.NETCore.APP 3.1.0and all-time try to install similar to NuGet package version and .net core version. Your NuGet package version is greater than the .net core version. consider it.