How to upgrade EF Core Tools

Solution 1:

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:

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:

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