Exception missing method : System.String Npgsql.NpgsqlConnectionStringBuilder.get_EntityAdminDatabase
regisdamon opened this issue · 1 comments
Hello,
I generate Postgresql table classes from visual studio 2022 with the following nuget :
EntityFramework -Version 6.5.1
Npgsql -Version 8.0.3
EntityFramework6.Npgsql -Version 6.4.3
.NET Framework 4.8
When I run the simple code
using (OpenProd db = new OpenProd()) { var p = db.product_product.ToList(); }
I get the following exceptions :
System.Data.Entity.Core.ProviderIncompatibleException : 'An error occurred accessing the database. This usually means that the connection to the database failed. Check that the connection string is correct and that the appropriate DbContext constructor is being used to specify it or find it in the application's config file. See http://go.microsoft.com/fwlink/?LinkId=386386 for information on DbContext and connections. See the inner exception for details of the failure.'
with inner exceptions :
ProviderIncompatibleException : The provider did not return a ProviderManifestToken string.
And :
MissingMethodException : Méthode introuvable : 'System.String Npgsql.NpgsqlConnectionStringBuilder.get_EntityAdminDatabase()'.
My connexion string is :
Is it a known problem for these versions ?
Newer versions of Npgsql (e.g. 8.0.3) are incompatible with EntityFramework6.Npgsql, which is no longer under active development. You'll need to reduce the dependency down to whatever EntityFramework6.Npgsql references.