How to install Npgsql as a data provider for ADO.NET Entity Framework?

随声附和 提交于 2019-12-11 03:36:05

问题


I have read all that I can find, but no luck. In Visual Studio 2015 Community, here is what I did (with no luck):

  1. Ran: Setup_NpgsqlDdexProvider. This installed Npgsql 3.0.7 and EntityFramework 6.0.0. It also installed Npgsql 3.0.7 in the GAC and the machine.config.
  2. install EntityFramework6.Npgsql
  3. Updated the Npgsql (with Nuget) to version 3.1.6
  4. Updated the EntityFramework to version 6.1.3
  5. Updated the GAC to Npgsql 3.1.6
  6. changed the machine.config at %SystemRoot%\Microsoft.NET\Framework\v4.0.30319\CONFIG and %SystemRoot%\Microsoft.NET\Framework64\v4.0.30319\CONFIG to Npgsql version 3.1.6

When I go to add the ADO.NET Entity Data, I check model from the database. Set the connection (it tests good). Upon returning from the connection window, the Wizard closes immediately.

How are the newest versions of EntityFramework6 and Npgsql installed for ADO.NET?

TIA


回答1:


Everything is described here, step by step on the page. Below is a link to github: How to setup NpgsqlDdexProvider 3.1.

I use Visual Studio 2015 and the database server PostgreSql 9.4. I installed Npgsql-3.1.8.msi who installed library Npgsql.dll in the GAC:

C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Npgsql\v4.0_3.1.8.0__5d8b90d52f46fda7

and installed NpgsqlDdexProvider-3.1.0.vsix that allows you to add a connection string under VS in Server Explorer for PostgreSQL.

It's work perfectly for me.



来源:https://stackoverflow.com/questions/38681642/how-to-install-npgsql-as-a-data-provider-for-ado-net-entity-framework

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!