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

437
Views
Why do Entity Framework Core migrations require .NET Core 2.x?

In my .NET5.0 project the PostgreSQL Nuget package is installed (Npgsql.EntityFrameworkCore.PostgrSQL (5.0.2)) and its dependency of EF Core (Microsoft.EntityFrameworkCore (5.0.2)).

I'm trying to create a migration using this command:

dotnet ef migrations add InitialCreate

However, the migration fails because I'm requested to install .NET Core 2.0.0 - following the recommended download link I'm told that it's no longer available and that I would likely want to use 5.0. How the heck can I run the migration?

This is what the output looks:

Build started...
Build succeeded.
It was not possible to find any compatible framework version
The framework 'Microsoft.NETCore.App', version '2.0.0' was not found.
  - The following frameworks were found:
      3.1.11 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
      3.1.12 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
      3.1.13 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
      5.0.3 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
      5.0.4 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

You can resolve the problem by installing the specified framework and/or SDK.

The specified framework can be found at:
  - https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=2.0.0&arch=x64&rid=osx.11.0-x64
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Make sure you have <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.5" /> in your csproj. Also try updating the dotnet-ef tool: dotnet tool update --global dotnet-ef.

I performed these actions and the issue went away.

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!