Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

502
Views
'Migrations' does not exist in the namespace 'Microsoft.EntityFrameworkCore'

I'm doing a ASP.NET Core project. I've installed Microsoft.EntityFrameworkCore and Microsoft.EntityFrameworkCore.Tools NuGet packages.

I ran Add-Migration InitialCreate command, Which created Migrations folder and 20180905180349_InitialCreate.cs file.

But it says

The type or namespace name 'Migrations' does not exist in the namespace 'Microsoft.EntityFrameworkCore' (are you missing an assembly reference?)

What is the cause of this error. Do i need to install any other package ?

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

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:

  1. Install-Package Microsoft.EntityFrameworkCore.SqlServer

  2. Install-Package Microsoft.EntityFrameworkCore.Tools (for powershell commands)

  3. Install-Package Microsoft.EntityFrameworkCore.Design (contains migrations engine - and important note this package has to be inside executable project)

And that's it.

over 4 years ago · Santiago Trujillo Report

0

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

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!