question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error message 'No executable found matching command "dotnet-ef"' when executing 'dotnet ef'

See original GitHub issue

Steps to reproduce

  • Open this manual: .NET Core - New Database
  • Follow the Steps “Prerequisites” and “Create a new project”
  • Since there is no project.json file, skip the step “Install Entity Framework” and add the following to the .csproj file:
  <ItemGroup>
    <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="1.1.0" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="1.1.0">
      <PrivateAssets>All</PrivateAssets>
    </PackageReference>
  </ItemGroup>
  <ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">
    <PackageReference Include="Microsoft.NETCore.App" Version="1.1.0" />
  </ItemGroup>
  <ItemGroup>
    <DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="1.1.0-preview4" />
  </ItemGroup>
  • Run dotnet restore
  • Follow the step “Create your database”

Expected behavior

  • The file /Blogging.db gets created

Actual behavior

  • The error message No executable found matching command "dotnet-ef" appears.

Environment data

dotnet --info output:

.NET Command Line Tools (1.0.0-rc3-004530)

Product Information:
 Version:            1.0.0-rc3-004530
 Commit SHA-1 hash:  0de3338607

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.14393
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\1.0.0-rc3-004530

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5

github_iconTop GitHub Comments

4reactions
MovGP0commented, Feb 18, 2017

the issue is that I’ve used the wrong tool reference. This one works:

<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="1.0.0-msbuild3-final" /> 
0reactions
MovGP0commented, Mar 18, 2017

if it is searching for the project.json file, then it’s an old version of the tools. however, the version for Mac might not be finished yet.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No executable found matching command "dotnet-ef"
I think I have found the Accurate solution for the problem - dotnet : No executable found matching command "dotnet-ef".. I am using...
Read more >
No executable found matching command "dotnet-ef" even ...
I want to Migrate my Database with Models. I am using EF Core 2.0 Preview. dotnet ef migrations add InitialCreate dotnet : No...
Read more >
How to fix error — “dotnet : No executable found matching ...
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” ......
Read more >
Fix "No executable found matching command dotnet-ef ...
How to fix the "No executable found matching command dotnet-ef" error in Visual Studio 2017 when using Entity Framework Core 2.x with ASP....
Read more >
The "No executable found matching command dotnet-ef ...
The "No executable found matching command dotnet-ef" error · Double-check that you properly added the Microsoft.EntityFrameworkCore.Tools and the Microsoft.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found