Package manager console Add-Migration command not working

ef-migrations entity-framework-core

Question

First of all, all other questions here with this problem are for ASP.NET Core projects, and the solution is to add the Microsoft.EntityFrameworkCore.Design to the tools section on project.json, but... I'm not using ASP.NET Core, so I don't have project.json in my project. So please keep it in mind before marking it as duplicate since I saw that's a fairly common question...

When I type add-migration InitialMigration on Package Manager Console I get the following error:

Cannot execute this command because Microsoft.EntityFrameworkCore.Design is not installed. Install the version of that package that matches the installed version of Microsoft.EntityFrameworkCore and try again.

But as you can see on the image bellow, it is installed on this project:

enter image description here

My database layer is in a separated project, which is Full Framework ClassLibrary, and because of this I don't have a projec.json file.

Does anyone tried to use migrations on class libraries projects?

1
1
12/30/2016 9:37:24 PM

Popular Answer

In dotnet core this is typically due to the fact that you're missing a package. Go into the NuGet Package Manager on the solution level and install Microsoft.EntityFrameworkCore.Tools for your project.

enter image description here

0
3/19/2017 3:32:27 AM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow