无法在Visual Studio 2017 RC中从数据库生成模型

时间:2016-12-29 02:33:35

标签: entity-framework-core asp.net-core-1.0 visual-studio-2017

我遵循了this link中提供的Entity Framework Core数据库第一种方法的官方Microsoft教程。

当我尝试执行以下命令从数据库生成模型时:

Scaffold-DbContext "Server=Data Source=DESKTOP-COJD62N;Initial Catalog=TrainGameDB;Integrated Security=True" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models -context TrainGameContext -Verbose

我得到以下输出:

Build started...
Build succeeded.
dotnet exec needs a managed .dll or .exe extension. The application specified was 'F:_IIT Level 6\UX\CW2 Backend\App2\TrainGameAPI\src\TrainGameAPI\bin\Debug\netcoreapp1.0\TrainGameAPI.runtimeconfig.json'
Process finished with non-zero exit code

我正在使用:

Visual Studio 2017 RC

SQL Server 2016开发人员

.NET Core 1.1.0(我卸载了1.0.1版并安装了它)

ASP.NET核心Web API应用程序

Windows 10教育

以下是我的.csproj文件中的软件包列表(VS 2017没有package.json文件)

<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="1.1.0" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer.Design" Version="1.1.0" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="1.1.0-preview4-final" />
    <PackageReference Include="Microsoft.NETCore.App" Version="1.0.1" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.0.1" />
    <PackageReference Include="Microsoft.AspNetCore.Routing" Version="1.0.1" />
    <PackageReference Include="Microsoft.AspNetCore.Server.IISIntegration" Version="1.0.0" />
    <PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="1.0.1" />
    <PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="1.0.0" />
    <PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="1.0.0" />
    <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="1.0.0" />
    <PackageReference Include="Microsoft.Extensions.Logging" Version="1.0.0" />
    <PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.0.0" />
    <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.0.0" />
    <PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="1.0.0" />

0 个答案:

没有答案