Unable to generate model from database in Visual Studio 2017 RC

1.3k Views Asked by At

I followed the official Microsoft tutorial for Entity Framework Core database first approach available in this link.

When I try to execute the below command to generate the model from the database:

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

I am getting the following output:

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

I am using:

Visual Studio 2017 RC

SQL Server 2016 Developer

.NET Core 1.1.0 (I uninstalled version 1.0.1 and installed this)

ASP.NET Core Web API Application

Windows 10 Education

Here is the list of packages from my .csproj file (VS 2017 doesn't have a package.json file)

<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

There are 0 best solutions below