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

Entity Data model wizard crashes silently when generating a new EF model from existing database #2204

Open
K-Chsherbakov opened this Issue Oct 24, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@K-Chsherbakov

K-Chsherbakov commented Oct 24, 2018

Steps to reproduce

  1. From extisting C# project (WCF application in my case) right click on the project structure -->Add New Item-->ADO.NET Entity Data Model;
  2. In the Entity Data Model Wizard Select EF Designer from Database and click Next;
  3. Select existing connection or add a new one, click Yes Include Sensitive Data (or exclude it) 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.

The issue

Cannot create new data model from existring database. Tested on empty DB, with single table and column and many other options. After that wizard silently crashes.
I managed to "resovle" this issue, when I deployed database to my local machine and I was able to generate data from local db with the exact same tables, procedures and etc.

Further technical details

Windows 10
Visual Studio 2017 Professional Edition
PostgreSQL 10.5
EntityFramework v6.2.0
Npgsql v4.0.3
EntityFramework6.Npgsql v3.2.0
Npgsql PostgreSQL Integration v4.0.3

This is the first installation of Npgsql, no previous versions installed.

Other details about my project setup:

Output of the following command:
(new-object Net.WebClient).DownloadString("https://raw.githubusercontent.com/kenjiuno/CheckNpgsqlSetupStatus/master/CheckNpgsqlStatus.ps1") | iex ; CheckNpgsqlStatus

Host

Microsoft Visual Studio 15.0 Professional

GetSection system.data/DbProviderFactories


Name                                                  Description                                                              InvariantName                    AssemblyQualifiedName                                                                              
----                                                  -----------                                                              -------------                    ---------------------                                                                              
ODP.NET, Managed Driver                               Oracle Data Provider for .NET, Managed Driver                            Oracle.ManagedDataAccess.Client  Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version=4.122.1.0...
Microsoft SQL Server Compact 4.0 Client Data Provider .NET Framework Data Provider for Microsoft SQL Server Compact 4.0 Client Microsoft.SqlServerCe.Client.4.0 Microsoft.SqlServerCe.Client.SqlCeClientFactory, Microsoft.SqlServerCe.Client, Version=4.0.0.0, ...
Npgsql Data Provider                                  .NET Data Provider for PostgreSQL                                        Npgsql                           Npgsql.NpgsqlFactory, Npgsql                                                                       


DbProviderFactories.GetFactoryClasses


Name                                                  Description                                                              InvariantName                    AssemblyQualifiedName                                                                              
----                                                  -----------                                                              -------------                    ---------------------                                                                              
Odbc Data Provider                                    .Net Framework Data Provider for Odbc                                    System.Data.Odbc                 System.Data.Odbc.OdbcFactory, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a...
OleDb Data Provider                                   .Net Framework Data Provider for OleDb                                   System.Data.OleDb                System.Data.OleDb.OleDbFactory, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b7...
OracleClient Data Provider                            .Net Framework Data Provider for Oracle                                  System.Data.OracleClient         System.Data.OracleClient.OracleClientFactory, System.Data.OracleClient, Version=4.0.0.0, Culture...
SqlClient Data Provider                               .Net Framework Data Provider for SqlServer                               System.Data.SqlClient            System.Data.SqlClient.SqlClientFactory, System.Data, Version=4.0.0.0, Culture=neutral, PublicKey...
ODP.NET, Managed Driver                               Oracle Data Provider for .NET, Managed Driver                            Oracle.ManagedDataAccess.Client  Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version=4.122.1.0...
Microsoft SQL Server Compact 4.0 Client Data Provider .NET Framework Data Provider for Microsoft SQL Server Compact 4.0 Client Microsoft.SqlServerCe.Client.4.0 Microsoft.SqlServerCe.Client.SqlCeClientFactory, Microsoft.SqlServerCe.Client, Version=4.0.0.0, ...
Npgsql Data Provider                                  .NET Data Provider for PostgreSQL                                        Npgsql                           Npgsql.NpgsqlFactory, Npgsql                                                                       


Npgsql from DbProviderFactories.GetFactory

Npgsql, Version=4.0.3.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7
C:\USERS\U8583\APPDATA\LOCAL\MICROSOFT\VISUALSTUDIO\15.0_AEAD8CE2\EXTENSIONS\MF34UWIM.LUU\Npgsql.dll

Npgsql in active project

  • Real assembly version:
    Npgsql, Version=4.0.3.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7
    C:\Users\u8583\Documents\Visual Studio 2017\Projects\LoanChecker\LoanChecker\packages\Npgsql.4.0.3\lib\net451\Npgsql.dll
  • Actually loaded version where bindingRedirect affects:
    Npgsql, Version=4.0.3.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7
    C:\Users\u8583\Documents\Visual Studio 2017\Projects\LoanChecker\LoanChecker\packages\Npgsql.4.0.3\lib\net451\Npgsql.dll

Npgsql in OutputPath

  • Real assembly version:
    Npgsql, Version=4.0.3.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7
    C:\Users\u8583\Documents\Visual Studio 2017\Projects\LoanChecker\LoanChecker\LoanChecker\bin\Npgsql.dll
  • Actually loaded version where bindingRedirect affects:
    Npgsql, Version=4.0.3.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7
    C:\Users\u8583\Documents\Visual Studio 2017\Projects\LoanChecker\LoanChecker\LoanChecker\bin\Npgsql.dll
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment