efcore: error NU1202: Package dotnet-ef 3.0.1 is not compatible with netcoreapp3.0
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.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 35
- Comments: 37 (12 by maintainers)
@bricelam Presumably the workaround for anyone hitting this is to install the 3.0.0 version explicitly?
I don’t know why, but specifying a patch number didn’t work for me, so i just used:
It’s working properly now. Hope this helps, until we get the next patch working!
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.”
@chungonion It’s not actually even a warning. It’s just letting you know that you’re not running the latest so you won’t be getting the latest features and bug fixes.
@KbKev78, I’ve updated EF-Migrations-Script-Generator-Task so you are able to specify which version of dotnet-ef to be install. If you enter 3.0.0 you should be fine. I hope this makes the problem easier to deal with until it’s solved.
@Pilchie Is unlisting enough to prevent
dotnet tool install
from picking it? I suppose it will be once we ship 3.1.0.same here, does it mean that
dotnet-ef 3.0.1
is for.NET Core 3.1
?I follow the suggestion from here: https://github.com/aspnet/EntityFrameworkCore/issues/18977#issuecomment-556092925 and the error was gone. Now, I can run the entity framework command line interface.
It is weird,but for me helped add var connectionString = Configuration.GetConnectionString(“IdentityServerConnection”); services.AddDbContext<ApplicationDbContext>(options => … I’ve used different DbContext here before.
For me it is just a warning, and command still works after printing it.
Tagging @JunTaoLuo who was interested in this.
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.