How to upgrade EF Core Tools

Entity Frameworkasp.net Core

Entity Framework Problem Overview


When I add-migration i got this warning:

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

I haven't found any information how can I update this, except with updating DotNET Core SDK, but this hasn't worked for me.

Entity Framework Solutions


Solution 1 - Entity Framework

Update the tools using the package manager console:

Install-Package Microsoft.EntityFrameworkCore.Tools -Version 2.1.4

see this link https://www.nuget.org/packages/Microsoft.EntityFrameworkCore.Tools/

Solution 2 - Entity Framework

If you are using a command line ( CMD, Powershell, bash etc ) you can easily type the following to update into the latest version:

dotnet tool update --global dotnet-ef

If you want to update into a very specific version do the following:

dotnet tool update --global dotnet-ef --version VERSION_NUMBER

Example:

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

Solution 3 - Entity Framework

To piggyback on daniel-chikaka's solution, if you are still seeing the error after running the update command for the global environment.

dotnet tool update --global dotnet-ef

Try removing the --global parameter so that it updates the dotnet-tools.json file associated with the project.

dotnet tool update dotnet-ef

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionstefan.sttView Question on Stackoverflow
Solution 1 - Entity FrameworkTony BourdeauxView Answer on Stackoverflow
Solution 2 - Entity FrameworkDaniel ChikakaView Answer on Stackoverflow
Solution 3 - Entity FrameworkcminusView Answer on Stackoverflow