Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Package Microsoft.EntityFramework.Core 6.0.0 is not compatible with netcoreapp 3.1

I need to install the Microsoft Entity Framework Core package. But I get this error message:

Error NU1202: Package Microsoft.EntityFrameworkCore 6.0.0 is not compatible with netcoreapp3.1 (.NETCoreApp, Version = v3.1). Package Microsoft.EntityFrameworkCore 6.0.0 supports: net6.0 (.NETCoreApp, Version= v6.0)

The .csproj looks like this:

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp3.1</TargetFramework>
  </PropertyGroup>

</Project>
like image 330
probst Avatar asked Nov 14 '22 18:11

probst


2 Answers

my problem was that I use net 5 and it tried to install the latest version of entity framework so the solution was to mark the specific requested version. in package manager console I typed:

Install-Package Microsoft.EntityFrameworkCore.Tools -Version 5.0.10

and then it was successful

like image 127
miri l. Avatar answered Feb 15 '23 22:02

miri l.


I faced this problem and solve it by downloading the Package Microsoft.EntityFramework with version 5.0.10

like image 32
Fooz B Avatar answered Feb 15 '23 23:02

Fooz B