Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No executable found matching command "dotnet-ef" (Csproj)

I started a project on a Mac using VS Code and ASP.NET Core MVC, here is my csproj:

  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore" Version="1.1.1" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.2" />
    <PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.1.1" />
    <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.1.1" />
    <PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="1.1.0" />
    <PackageReference Include="Microsoft.AspNetCore.Authentication.Cookies" Version="1.1.0" />

    <PackageReference Include="System.Data.SqlClient" Version="4.3.0" />

    <PackageReference Include="Microsoft.EntityFrameworkCore" Version="1.1.1" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="1.1.1" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="1.1.1" PrivateAssets="All" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="1.1.0" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="1.0.0" />
  </ItemGroup>

I always get "No executable found matching command "dotnet-ef""

I tried it on Windows 10 and I get the same result.

What am I missing?

like image 368
Yannick Desjardins Avatar asked Dec 03 '22 22:12

Yannick Desjardins


1 Answers

Added this to make it work:

 <ItemGroup>
    <DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version = "1.0.0"/>
  </ItemGroup>
like image 184
Yannick Desjardins Avatar answered Dec 20 '22 19:12

Yannick Desjardins