EF core 2.0无法运行Scaffold-DbContext

时间:2018-02-21 06:50:09

标签: entity-framework

我正在练习" https://docs.microsoft.com/en-us/ef/core/get-started/aspnetcore/existing-db",创建了asp.net web核心应用程序,创建了数据库,并安装了三个软件包,但是当我运行时它出错了"支架-的DbContext ..."



<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>netcoreapp2.0</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.5" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.0.1" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.0.1" />
    <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.0.2" />
  </ItemGroup>

  <ItemGroup>
    <DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.2" />
  </ItemGroup>

</Project>
&#13;
&#13;
&#13;

重启vs2017,还是错!

我的环境:VS2017 15.5

PMC版本:4.5.0.4685

Blogging.Web.csproj

&#13;
&#13;
public static async clickIfDisplayed(targetElement: ElementFinder) {
    const isPresent = await targetElement.isPresent();
    if (isPresent) {
        const isDisplayed = await targetElement.isDisplayed();
        if (isDisplayed) {
            await PageHelper.click(targetElement);
        }
    }
}
&#13;
&#13;
&#13;

0 个答案:

没有答案