dotnet-ef does not exist
Date Published: 09 October 2019
If you're trying to run EF Core migrations using commands like
dotnet ef migrations add NAME or
dotnet ef database update and you're getting errors like the one shown in the screenshot above, here's the fix.
You need to install the dotnet-ef tool, ideally globally so you can run it from anywhere. To do so, run this script from a command prompt/terminal window:
dotnet tool install --global dotnet-ef
Once you've done so, you should be able to run your
dotnet ef commands successfully.
If this helped you, consider sharing this post on your social media to help others discover it. Thanks!
Steve is an experienced software architect and trainer, focusing currently on ASP.NET Core and Domain-Driven Design.