Need to Update EF Core Tools



When I use the dotnet ef tools in the VS 2017 Package Manager Console I get a warning message about needing to update EF Core tools:

PM> dotnet ef migrations list -s ../RideMonitorSite

The EF Core tools version '2.1.1-rtm-30846' is older than that of the runtime '2.1.2-rtm-30932'. Update the tools for the latest features and bug fixes.

But my csproj file has this entry:

    <DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="2.1.2" />

I've confirmed that the version installed is, in fact, out of date:

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

So what do I do to update the tools? BTW, I've seen in other answers that an out of date global.json file can cause this problem. But I don't have a global.json file anywhere in the solution.

8/31/2018 4:53:54 AM

Accepted Answer

Use command line, Cmd or PowerShell for specific version:

dotnet tool update --global dotnet-ef --version 3.1.0

or for latest version use (works also for reinstallation):

dotnet tool update --global dotnet-ef

12/8/2019 12:49:37 AM

Popular Answer

I bounced this issue over to the development team over on github. Turns out this is a known issue in the current tooling or nuget packages that get loaded when you create an EF Core-powered AspNet Core site. It's targeted to be fixed in a future release.

For now, the workaround is simply to ignore the warning.

Another workaround is also offered, involving tweaking the csproj file to define the version of the AspNet Core metapackage explicitly -- it's up to 2.1.3 as I'm writing this -- but I couldn't get that approach to work; I still kept getting the warning message.

Related Questions


Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow