No executable found matching command “dotnet-ef”

Entity Framework Core 1.0

You should just need to update the tools section of your project.json file to include this:

"Microsoft.EntityFrameworkCore.Tools": {
  "version": "1.0.0-preview1-final",
  "imports": [
    "portable-net45+win8+dnxcore50",
    "portable-net45+win8"
  ]
}

This should make the dotnet ef commands available.

Important

I should also note here that the dotnet ef commands will only be available when running them from the same directory which contains the project.json file.

Entity Framework Core 1.1
If you are having this problem again after upgrading to Entity Framework Core 1.1, be sure to replace the Microsoft.EntityFrameworkCore.Tools dependency with Microsoft.EntityFrameworkCore.Tools.DotNet version 1.1.0-preview4. There is no need to keep the imports section, either. For more information on this, see the “Upgrading to 1.1” heading under the Entity Framework Core 1.1 release announcement blog post.

Leave a Comment