Ashley
Ashley

Reputation: 189

Database-First, Npgsql setup error Configuration system failed to initialize

I'm attempting to setup EF Core in my Npgsql database application. I am using Visual Studio 2017 version 15.4 and Entity Framework Core with the following Nuget Packages installed.

I entered this with my connection string information, but am receiving the following error below.

Code: PM> Scaffold-DbContext "Host=localhost;Database=mydatabase;Username=myuser;Password=mypassword" Npgsql.EntityFrameworkCore.PostgreSQL

Error: Configuration system failed to initialize

Upvotes: 0

Views: 259

Answers (1)

Ashley
Ashley

Reputation: 189

I found my error. I added the following code to my App.config file, based on help documents I was reading and this code was not needed:

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

Upvotes: 0

Related Questions