No executable found matching command "dotnet-ef" entity-framework


I'm doing a project sample by using ASP.Net Core RC2 with Microsoft.EntityFramework.Core and SQLite.

I've followed this tutorial:

But, when I run this command :

dotnet ef migrations add FirstMigration

I got this error :

No executable found matching command "dotnet-ef"

Here is my project.json configuration:

  "dependencies": {
    "Microsoft.NETCore.App": {
      "version": "1.0.0-rc2-3002702",
      "type": "platform"
    "Microsoft.AspNetCore.Mvc": "1.0.0-rc2-final",
    "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-rc2-final",
    "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-rc2-final",
    "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0-rc2-final",
    "Microsoft.Extensions.Configuration.FileExtensions": "1.0.0-rc2-final",
    "Microsoft.Extensions.Configuration.Json": "1.0.0-rc2-final",
    "Microsoft.Extensions.Logging": "1.0.0-rc2-final",
    "Microsoft.Extensions.Logging.Console": "1.0.0-rc2-final",
    "Microsoft.Extensions.Logging.Debug": "1.0.0-rc2-final",
    "Microsoft.EntityFrameworkCore": "1.0.0-rc2-final",
    "Microsoft.EntityFrameworkCore.Sqlite": "1.0.0-rc2-final"

  "tools": {
    "Microsoft.AspNetCore.Server.IISIntegration.Tools": {
      "version": "1.0.0-preview1-final",
      "imports": "portable-net45+win8+dnxcore50"

  "frameworks": {
    "netcoreapp1.0": {
      "imports": [

  "buildOptions": {
    "emitEntryPoint": true,
    "preserveCompilationContext": true

  "runtimeOptions": {
    "gcServer": true

  "publishOptions": {
    "include": [

  "scripts": {
    "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
6/19/2016 3:42:12 AM

Accepted Answer

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": [

This should make the dotnet ef commands available.


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.

11/29/2017 3:25:23 AM

Popular Answer

Entity Framework Core 1.1

Adding in on this if you're using VS2017 with the new .csproj projects without a project.json file

you need to edit the .csproj file (right click it in solution explorer and click edit whatever.csproj) and then paste this in

    <DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet">

courtesy of :

Related Questions


Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow