How to fix error — “dotnet : No executable found matching command “dotnet-ef”’
Entity Framework Core 2.0 + Visual Studio 2017 IDE + DotNet CLI
While setting up new .NET Core Web API 2.0 projects with EF Core 2.0, you may encounter this error: “dotnet : No executable found matching command “dotnet-ef” when you try to add initial migration or running command
dotnet ef database update from Visual Studio 2017 IDE.
In Google search you will find solutions to update your
.csproj files with matching NuGet EF Core packages versions.
If your issue is not resolved by version update and you are running command in Visual Studio’s Package manager console then make sure your current working directory contains
.csprojfile. When you start Package Manager console inside VS 2017, it set current working directory with solution folder. So you must go to one level deep where
.csprojfile is present and then run
dotnet ef database updatecommand.