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

后端 未结 15 733
天涯浪人
天涯浪人 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:30

    Please make sure You have installed below packages. I was also getting same error and Installed below packages and it worked for me.

    Microsoft.EntityFrameworkCore.SqlServer
    Microsoft.EntityFrameworkCore.Design
    Microsoft.EntityFrameworkCore.Tools
    
    0 讨论(0)
  • 2021-02-01 13:30

    This happen for me when

    Both Entity Framework Core and Entity Framework 6 are installed. The Entity Framework Core tools are running. Use 'EntityFramework6\Add-Migration' for Entity Framework 6.

    solution was EntityFrameworkCore\Add-Migration

    0 讨论(0)
  • 2021-02-01 13:33

    More a workaround than a solution, I ended up unloading the startup project from the solution. Ran the migration, added the project back to the solution. I don't expect to have many migrations, so it worked for me. What baffles me is that I have a solution with similar features and I didn't have the same issue.

    0 讨论(0)
提交回复
热议问题