Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

438
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda