Loading

未找到与命令“dotnet-ef”匹配的可执行文件

未找到与命令“dotnet-ef”匹配的可执行文件

Specific to VS2017 15.3 or greater and ASP.NET CORE 2.0 or later...

Install nuget for db provider via command line or nuget package manager.

dotnet add package Microsoft.EntityFrameworkCore.SqlServer

Add following section to .csproj

<ItemGroup>
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" 
    Version="2.0.0" />
</ItemGroup>

Install design time tools via commandline or nuget manager in VS2017.

dotnet add package Microsoft.EntityFrameworkCore.Design

This enables dotnet ef * at the command line in the project directory.

Enables dotnet ef * commands at the command line in the project directory,

dotnet ef migrations add Initial
dotnet ef database update Initial
dotnet ef dbcontext scaffold 
posted @ 2018-04-17 18:20  Dhoopu  阅读(2386)  评论(0编辑  收藏  举报