No executable found matching command "dotnet-ef"

asp.net-core asp.net-core-1.0 entity-framework

Accepted Answer

Core Entity Framework 1.0

It should only be necessary to update thetools component of your project. This should be in the json file:

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

Consequently, thedotnet ef the available commands.

Important

Additionally, I should mention that thedotnet ef Only when running commands from the same directory as the project.json file will they be accessible.

1.1 of Entity Framework
After updating to Entity Framework Core 1.1, if you experience this issue once more, be sure to replace theMicrosoft.EntityFrameworkCore.Tools dependance onMicrosoft.EntityFrameworkCore.Tools.DotNet version 1.1.0-preview4 It is unnecessary to maintain theimports either part. See the "Upgrading to 1.1" heading under the A blog post announcing the release of Entity Framework Core 1.1 for further details on this.

60
11/29/2017 3:25:23 AM

Popular Answer

1.1 of Entity Framework

If you're using VS2017 and the new.csproj projects without a project.json file, I'd like to add in on this.

After pasting this, you must modify the.csproj file (right-click it in solution explorer and select Edit Whatever.csproj).

<ItemGroup>
    <DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet">
      <Version>1.0.0-*</Version>
    </DotNetCliToolReference>
  </ItemGroup>

with thanks to: https://github.com/aspnet/EntityFramework/issues/7358#issuecomment-278379967



Related Questions





Related

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