I am trying to connect my .NET project to a postgres database using entity framework 6 in Visual Studio 2019. I'm the getting the error:
unable to find the requested .net framework data provider. it may not be installed. or the window just closes and nothing happens
These are the steps I took:
1 - Installed the npgsql extension to visual studio version 4.1.3.1 (I think this is the latest one available)
2 - Installed the npgsql nuget package from the package manager Version 4.1.3.1
3 - nuget package entityframework6 version 6.4.0
4 - nuget package entityframework6.npgsql version 6.4.0
5 - my web.config has the neccessary line:
<DbProviderFactories>
<remove invariant="Npgsql" />
<add name="Npgsql Provider" invariant="Npgsql" description=".NET Framework Data Provider for PostgreSQL" type="Npgsql.NpgsqlFactory, Npgsql, Version=4.0.10.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7" />
</DbProviderFactories>
6 - On the server explorer, when I try to add a connection I am able to choose Postgres Database as a datasource
7 - When i try to type anything into the boxes to enter the server information it automatically closes the window and doesn't continue
I've also tried adding it thru the Server Explorer. The same thing happened when and I get the error
Can anyone help me with what I'm doing wrong?