Visual Studio 2015中的向导缺少PostgreSQL数据提供程序 [英] PostgreSQL data provider missing from wizard in Visual Studio 2015

查看:415
本文介绍了Visual Studio 2015中的向导缺少PostgreSQL数据提供程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我花了整整一天的时间尝试将Entity Framework 6 SQL Server CE迁移到PostgreSQL.

我已经很好地复制了数据库,但似乎无法使数据提供程序正常工作.

首先,我尝试了较早的EF提供程序2.2.7版本,该版本不需要.NET 4.5(因为我们的项目无法使用它),但这是行不通的.我一直使用NpgsqlConnection而不是SqlConnectionStringBuilder并将app.config更改为具有Host的连接字符串(我尝试使用Server,但它不喜欢它)和Database值,并确保EF部分如下:

<entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
    <providers>
        <provider invariantName="Npgsql" type="Npgsql.NpgsqlServices, EntityFramework6.Npgsql" />
    </providers>
</entityFramework>

我现在只是为了使它起作用而忽略了此限制,因此我拥有EF提供程序的EF6 v3.1.1版本和最新的.NET提供程序(v3.2.2),但它们都不起作用.

为了修复它,我还尝试通过安装VS2015扩展将EDMX从SQL Server CE重新同步到PostgreSQL替换,但是它只是给出一条消息,指出发生了错误,所以我尝试过此操作: https://github.com/npgsql/npgsql/issues/1514 进了一步,打开了窗户,但是当我在盒子里输入内容时,它就崩溃了................................................................由于将项目升级到.NET 4.5,此提供程序不再出现...

我已经尝试过多次重新安装所有内容并重新启动VS,并且自升级以来,我还尝试安装GAC文件,因为尚不清楚VS扩展是否需要它们(以及v3.2.2)./p>

有人能阐明所有这些工作的简便程度,最好是不需要.NET 4.5的情况吗?

谢谢

解决方案

我安装了Visual Studio Extension Npgsql PostgreSQL集成. 请按照此页面上的说明进行操作: http://www.npgsql.org/doc/ddex.html

该线程将我引向正确的路径:添加自定义数据源到Visual Studio 2015

I've spent a day trying to migrate an Entity Framework 6 SQL Server CE to PostgreSQL.

I've copied the database over fine, but I can't seem to get the data provider to work.

Firstly I tried the older 2.2.7 version of the EF provider, which doesn't require .NET 4.5 (because our project can't use it), but that didn't work. I've been using NpgsqlConnection instead of SqlConnectionStringBuilder and changed the app.config to have a connection string with Host (I tried Server but it didn't like it) and Database values, and made sure the EF section is as follows:

<entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
    <providers>
        <provider invariantName="Npgsql" type="Npgsql.NpgsqlServices, EntityFramework6.Npgsql" />
    </providers>
</entityFramework>

I've now ignored this limitation just to try and get it working, so I have the EF6 v3.1.1 version of the EF provider and the latest .NET provider (v3.2.2) and that's not working either.

In an attempt to fix it, I've also been trying to re-sync the EDMX from the SQL Server CE to the PostgreSQL replacement by installing the VS2015 extension, but it just gave a message saying an error occurred, so I tried this: https://github.com/npgsql/npgsql/issues/1514 which got further, opening the window, but then crashed as soon as I typed into the boxes. Since upgrading the project to .NET 4.5, this provider no longer appears at all...

I've tried reinstalling everything several times and restarting VS a lot, and Since upgrading I've also tried installing the GAC files, as it wasn't clear if the VS extension needed them (also v3.2.2).

Is anyone able to shed some light on how easiest to get all this working, preferably without the requirement of .NET 4.5?

Thanks

解决方案

I got it working with installing the Visual Studio Extension Npgsql PostgreSQL Integration. Follow the instruction on this page: http://www.npgsql.org/doc/ddex.html

This thread led me to the right path: Add custom data source to visual studio 2015

这篇关于Visual Studio 2015中的向导缺少PostgreSQL数据提供程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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