At the time of writing, there's a nasty issue affecting most .NET Core-based Visual Studio projects that can prevent the dotnet ef command from working properly. More specifically, we may be prompted by the following error message when trying to execute any dotnet ef based command:
No executable found matching command "dotnet-ef"
If we happen to experience this issue, we can try to check out the following:
- Double-check that we added the Microsoft.EntityFrameworkCore.Tools and Microsoft.EntityFrameworkCore.Tools.DotNet package libraries (as explained earlier) properly, as they are required for the command to work.
- Ensure that we're issuing the dotnet ef command in the project's root folder—the same one that also contains the <ProjectName>.csproj file; it won't work anywhere else.
If both of these checks hit their marks, we can try the following workaround: right-click on the...