Development environment:
Refer to http://www.npgsql.org/efcore/index.html
Here's the .csproj contents:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Folder Include="wwwroot\" />
<Folder Include="SQL Scripts\" />
<Folder Include="Models\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="2.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.0.0" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL.Design" Version="2.0.0-preview1" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0" />
</ItemGroup>
</Project>
From the .csproj contents, note the version of "Npgsql.EntityFrameworkCore.PostgreSQL.Design". It is "2.0.0-preview1". There was no nuget package for "2.0.0".
When I attempt to issue a command to reverse-engineer an existing postgreSQL database, I encounter the following message:
Version for package `Microsoft.VisualStudio.Web.CodeGeneration.Tools` could not be resolved.
Here's the sanitized command line I used to reverse-engineer the existing database:
dotnet ef dbcontext scaffold "Host=localhost;Database=mydatabase;Username=me;Password=mypwd" Npgsql.EntityFrameworkCore.PostgreSQL
The version of the Microsoft.VisualStudio.Web.CodeGeneration.Tools package is version 2.0.0.
My NuGet settings are as follows:
A few notes: