Search code examples
entity-framework-core

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.
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.


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