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. 20180831043252_Initial
But my csproj file has this entry:
<ItemGroup> <DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="2.1.2" /> </ItemGroup>
I've confirmed that the version installed is, in fact, out of date:
PM> dotnet ef --version Entity Framework Core .NET Command-line Tools 2.1.1-rtm-30846
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.
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
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.