'Migrations' does not exist in the namespace 'Microsoft.EntityFrameworkCore'
Ok, I will show you the minimal setup required for EF Core + Migrations:
You will need to install Microsoft.EntityFramework.Core, but it is better that instead of that package you first install a EF Core provider for the database you will use. Then that EF Core provider will pull in all the required dependencies ( including Microsoft.EntityFramework.Core ) .
So (for example) for SQLServer db, in the Package Manager Console I will install:
Install-Package Microsoft.EntityFrameworkCore.SqlServer
Install-Package Microsoft.EntityFrameworkCore.Tools (for powershell commands)
Install-Package Microsoft.EntityFrameworkCore.Design (contains migrations engine - and important note this package has to be inside executable project)
And that's it.
I faced a similar issue and found that I haven't installed Microsoft.EntityFrameworkCore.SqlServer
. Initially, I have installed only Microsoft.EntityFrameworkCore
and Microsoft.EntityFrameworkCore.Tools
.
After installing Microsoft.EntityFrameworkCore.SqlServer
problem gets resolved