6
votes

I am trying to use EF core Migration features. But when I install dotnet-ef tools from NuGet, below error message is thrown. My app version is netcoreapp3.0.

dotnet tool install --global dotnet-ef --version 3.1.0-preview3.19554.8

error NU1202: Package dotnet-ef 3.1.0-preview3.19554.8 is not compatible with netcoreapp3.0 (.NETCoreApp,Version=v3.0) / any. Package dotnet-ef 3.1.0-preview3.19554.8 supports: netcoreapp3.1 (.NETCoreApp,Version=v3.1) / any

Older version only support netcoreapp2.1

dotnet tool install --global dotnet-ef --version 3.0.1

error NU1202: Package dotnet-ef 3.0.1 is not compatible with netcoreapp3.0 (.NETCoreApp,Version=v3.0) / any. Package dotnet-ef 3.0.1 supports: netcoreapp2.1 (.NETCoreApp,Version=v2.1)

Actually which dotnet-ef version is supporting netcoreapp3.0 Any idea?

2

2 Answers

13
votes

This works for me on November 2019

dotnet tool install --global dotnet-ef --version 3.0.0
0
votes

Please check this question and its answers: Update .NET Core Tools

It appears to be a known bug, as pointed out by an answer to that question: https://github.com/dotnet/cli/issues/12963

The person who posted that question answered with a workaround they found. Maybe it will work for you as well.