efcore icon indicating copy to clipboard operation
efcore copied to clipboard

error NU1202: Package dotnet-ef 3.0.1 is not compatible with netcoreapp3.0

Open yongsauheung opened this issue 7 years ago • 37 comments

I'm installing dotnet-ef 3.0.1 on Azure DevOps release pipeline with dotnetcore 3.0; installation fails with incompatibility error.

Steps to reproduce

Run

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

Expected

Tool 'dotnet-ef' (version '3.0.1') was successfully installed.

Actual

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)

Further technical details

EF Core version: 3.0 dotnet-ef version: 3.0.1

Issue is NOT seen in dotnet-ef version 3.0.0. I'm currently using this version to resolve the issue.

yongsauheung avatar Nov 19 '19 04:11 yongsauheung

same here, does it mean that dotnet-ef 3.0.1 is for .NET Core 3.1 ?

Nothing-Works avatar Nov 19 '19 05:11 Nothing-Works

same here, and dotnet tool install --global dotnet-ef --version 3.0.0-* is not affected too. It seems that the one for .NET Core 3.1 is dotnet-ef 3.1.0.

I think this issue a typo netcoreapp2.1 instead of netcoreapp3.0.

misaka4e21 avatar Nov 19 '19 09:11 misaka4e21

Guess there is a bug that was meant to be netcoreapp >= 2.1 instead of netcoreapp == 2.1. 3.0.0 also shows netcoreapp2.1 as dependency but works as expected

ffloimair avatar Nov 19 '19 12:11 ffloimair

@bricelam @Pilchie @dougbu Looks possible from this that the package for dotnet-ef was not built correctly.

ajcvickers avatar Nov 19 '19 19:11 ajcvickers

image

image

ErikEJ avatar Nov 19 '19 19:11 ErikEJ

I'm assuming we didn't make any changes to dotnet-ef in 3.0.1? Should we just unlist the package and tell people to keep using the 3.0.0 version?

Pilchie avatar Nov 20 '19 01:11 Pilchie

I fixed the package in release/3.1 for 3.1.0-preview2, but it looks like it also got broken in release/3.0. I can backport the fix.

bricelam avatar Nov 20 '19 02:11 bricelam

Does someone know when this issue will be fixed?

andre-dasilva avatar Nov 20 '19 15:11 andre-dasilva

@Pilchie Is unlisting enough to prevent dotnet tool install from picking it? I suppose it will be once we ship 3.1.0.

bricelam avatar Nov 20 '19 15:11 bricelam

I think it will, but looping in @nguerrera to confirm.

Pilchie avatar Nov 20 '19 15:11 Pilchie

@wli3

nguerrera avatar Nov 20 '19 15:11 nguerrera

I don’t know so I’ve added Will to confirm

nguerrera avatar Nov 20 '19 15:11 nguerrera

Right now without fix in 3.0.1 you cannot run dotnet ef commands when on .net core 3.0.100. You get smth like this The EF Core tools version '3.0.0' is older than that of the runtime '3.0.1'. Update the tools for the latest features and bug fixes.

Kant8 avatar Nov 20 '19 15:11 Kant8

@bricelam Presumably the workaround for anyone hitting this is to install the 3.0.0 version explicitly?

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

ajcvickers avatar Nov 20 '19 16:11 ajcvickers

I've got 3.0.0 installed and it still errors with.

"The EF Core tools version '3.0.0' is older than that of the runtime '3.0.1'. Update the tools for the latest features and bug fixes."

derekforeman avatar Nov 20 '19 16:11 derekforeman

@nkolev92 can unlist stop nuget restore "*" that version? I heard from Gallery folks that unlist only controls nuget.org's search

wli3 avatar Nov 20 '19 16:11 wli3

@Kant8 and @derekforeman I have the 3.0.0 version of dotnet-ef installed as well as the 3.0.100 SDK. I'm not seeing the inability to roll forward you describe.

> dotnet --version
3.0.100

> dotnet ef --version
Entity Framework Core .NET Command-line Tools
3.0.0

> dotnet ef migrations list
info: Microsoft.EntityFrameworkCore.Infrastructure[10403]
      Entity Framework Core 3.0.0 initialized 'ApplicationDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer' with options: None
00000000000000_CreateIdentitySchema

What's different in your environment?

dougbu avatar Nov 20 '19 17:11 dougbu

When taking ajcvickers recommendation to explicitly install 3.0.0, I no longer receive the error message.

joshuasnyder avatar Nov 20 '19 18:11 joshuasnyder

Tagging @JunTaoLuo who was interested in this.

Pilchie avatar Nov 20 '19 18:11 Pilchie

@nkolev92 can unlist stop nuget restore "*" that version? I heard from Gallery folks that unlist only controls nuget.org's search

That is correct, unlist only affects search.

nkolev92 avatar Nov 20 '19 19:11 nkolev92