Your startup project doesn't reference Microsoft.EntityFrameworkCore.Design

后端 未结 15 910
天涯浪人
天涯浪人 2021-02-01 12:51

I have 2 projects in my solution, I have a project with Entity Framework Core installed:

And in the other ASP.NET Web API project I have these packages:

15条回答
  •  野性不改
    2021-02-01 13:09

    I got this error because Visual Studio defaulted to using entity framework core rather than old-school entityframework for .NET Framework: entity framework 6. This was my solution:

    EntityFramework\Update-Database
    

    Or reference the version explicitly:

    EntityFramework6\Update-Database
    

    Also worth checking the right project is selected in the Package Manager Console. That likes to sneak back to other projects half the time!

提交回复
热议问题