如何安装Npgsql作为ADO.NET Entity Framework的数据提供者? [英] How to install Npgsql as a data provider for ADO.NET Entity Framework?

查看:975
本文介绍了如何安装Npgsql作为ADO.NET Entity Framework的数据提供者?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经阅读了所有可以找到的东西,但没有运气。在Visual Studio 2015社区,这里是我所做的(没有运气):


  1. Ran:Setup_NpgsqlDdexProvider。这安装了Npgsql 3.0.7和EntityFramework 6.0.0。它还在GAC和machine.config中安装了Npgsql 3.0.7。

  2. 安装EntityFramework6.Npgsql

  3. 将Npgsql(使用Nuget)更新为版本3.1.6

  4. 将EntityFramework更新到版本6.1.3

  5. 将GAC更新为Npgsql 3.1.6

  6. 将machine.config更改为%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\CONFIG和%SystemRoot%\Microsoft.NET\Framework64\v4.0.30319\CONFIG到Npgsql版本3.1.6

当我去添加ADO.NET实体数据时,我从数据库中检查模型。设置连接(它测试很好)。从连接窗口返回后,向导会立即关闭。



如何为ADO.NET安装最新版本的EntityFramework6和Npgsql?



TIA

解决方案

一切都在这里描述,一步一步的在页面上。以下是github的链接:


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

解决方案

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.

这篇关于如何安装Npgsql作为ADO.NET Entity Framework的数据提供者?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆