Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding new Model from EF Wizard will crash #104

Open
ScottDizzy opened this issue Jul 10, 2018 · 4 comments
Open

Adding new Model from EF Wizard will crash #104

ScottDizzy opened this issue Jul 10, 2018 · 4 comments

Comments

@ScottDizzy
Copy link

@roji
Pretty sure this is a duplicate of npgsql/npgsql#1445 But when I tried to comment on it I was told that was for NPGSQL not EntityFramework6.npgsql.

---Issue---
As I"m going through the steps to add a data model the wizard will disappear.

---Steps---

  1. Opened vs2017 created new project (web app or wcf) target the .netFramework 4.5.1 (or 4.5).
  2. Install NuGet EntityFramework 6.2.0
  3. Install NuGet Npgsql 4.0.2
  4. Install NuGet EntityFramework6.Npgsql
  5. Build Project successfully
  6. Right Click Project-->Add New Item-->ADO.NET Entity Data Model
  7. In the Entity Data Model Wizard Select EF Designer from Database and click Next>
  8. Select existing connection, click Yes Include Sensitive Data in Connection String and click Next>
    The wizard flashes the next screen and disappears. on that screen I can see the Entity Framework 6 Radio Button is selected (not of importance to the issue).

---End Of Issue---

---Notes---
I tried this several times last week and read several of the posts that are out there. This was right before the update to EntityFramework6.Npgsql v3.2.0. At one point I checked my dependencies and think I only had the Npgsql installed and needed the EntityFramework6.Npgsql. After I had dependencies installed I was able to create a model. That is as far as my testing went that day...Then there were the new releases for Npgsql and EntityFramework6.npgsql so I updated both of those. Then I tried to retrieve data through EF.
using (var dbContext = new 360Entities())
{
return (dbContext.servers.ToList());
}
This didn't work (separate issue) so I tried starting over with a new project. Therefore this is straight out of the box and I thought this should be working. Hopefully a solution is found soon.

Sincerely
Scott~

@iyaneruz0
Copy link

Been struggling with the same issue since 2 days ago.
The output only shows an error if I start Visual Studio and do nothing else but try to create a new ADO.NET Entity.
This is what I get:
Could not parse the configuration file. The error message is: 'Value cannot be null.
Parameter name: projectItems'. Try editing the file manually and then saving it.
The wizard also doesn't add any <ConnectionString> in the app.config / web.config as usual when checking the "Save connection settings in Web.Config as:" and pressing "Next", then the wizards just closes on its own as mentioned by @ScottDizzy.
I ultimately reverted to v3.1.1 since it appears to still be working with Npgsql v4.0.2 and EntityFramework v6.2.0

@ScottDizzy
Copy link
Author

@Seiakira I rolled back my nuget for EntityFramework6.Npgsql to 3.1.1 and was able to successfully add a new data model! Thank you for the suggestion!

@ScottDizzy
Copy link
Author

ps. going this route I had to add

  <system.data>
    <DbProviderFactories>
      <add name="Npgsql Data Provider" invariant="Npgsql" description=".Net Data Provider for PostgreSQL" type="Npgsql.NpgsqlFactory, Npgsql, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7"/>
    </DbProviderFactories>
  </system.data>

into my projects web.config before I could retrieve data.

@ghost
Copy link

ghost commented Aug 24, 2018

Ugh, that issue butthurts me so much... EF EDM Wizard just closing it's windows silently after connection settings. And you know what's the problem? After copying the whole database structure to another server - all is working. So it's defenitely not the problem with EntityFramework6.Npgsql itself but between this and Data Connection in Visual Studio, probably it can't parse something.
P.S I tried to rollback to 3.1.1, it didn't helped me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants