Microsoft dotnet ef migration error

Kefiloe Moshoaliba 6 Reputation points

When I run any dotnet ef command, like "dotnet ef migrations add InitialCreate", i get the following error message:

Could not execute because the specified command or file was not found.
Possible reasons for this include:
* You misspelled a built-in dotnet command.
* You intended to execute a .NET program, but dotnet-ef does not exist.
* You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.

The dotnet ef is already installed.

Microsoft Technologies based on the .NET software framework.
3,641 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Michael Taylor 51,346 Reputation points

    Run dotnet tool list and show us what you get back. If EF is not part of that then you don't have the version of the tool installed that your dotnet CLI is running against. Install it again using the dotnet CLI.

    1 person found this answer helpful.
    0 comments No comments