J'essaye depuis quelque temps d'installer désespérément Npgsql, le provider .NET gratuit pour PostgreSQL.
Voici les diverses étapes que je réalise.
###> INSTALLATION
1) Téléchargement de Npgsql : Npgsql2.0.11.91-bin-ms.net3.5sp1
Je copie/colle:
- Mono.Security.dll
- Npgsql.dll
dans C:\Windows\assembly
2) Je modifie machine.config Path: C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config
je rajoute entre <DbProviderFactories></DbProviderFactories>
Citation
<add name="Npgsql Data Provider" invariant="Npgsql" description=".Net Framework Data Provider for Postgresql Server" support="FF" type="Npgsql.NpgsqlFactory, Npgsql, Version=2.0.11.91, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7" />
J'ai bien vérifié la Version et le PublicKeyToken, ils sont correct.
###> TEST
A) Je tape la commande suivante:
> EdmGen2.exe /modelgen "Port=5432;Encoding=utf8;Server=127.0.0.1;Database=test;UserId=postgres;Password=abcd" Npgsql Northwind
Citation
Unhandled Exception: System.ArgumentException: The specified store provider 'Npgsql' cannot be found in the configuration, or 'Npgsql' is not valid. ---> System.ArgumentException: Unable to find the requested .Net Framework Data Provider.
It may not be installed.
at System.Data.Entity.Design.EntityStoreSchemaGenerator.CreateStoreSchemaConnection(String providerInvariantName, String connectionString)
--- End of inner exception stack trace ---
at System.Data.Entity.Design.EntityStoreSchemaGenerator.CreateStoreSchemaConnection(String providerInvariantName, String connectionString)
at System.Data.Entity.Design.SsdlGenerator.EntityStoreSchemaGeneratorDatabaseSchemaLoader..ctor(String providerInvariantName, String connectionString)
at System.Data.Entity.Design.EntityStoreSchemaGenerator..ctor(String providerInvariantName, String connectionString, String namespaceName)
at EdmGen2.EdmGen2.ModelGen(String connectionString, String provider, String modelName, Version version, Boolean includeForeignKeys)
at EdmGen2.EdmGen2.ModelGen(String[] args)
at EdmGen2.EdmGen2.Main(String[] args)
B) Si je rajoute dans n'importe quel projet la directive suivante sans rajouter une référence vers la DLL, il n'est pas content:
using Npgsql.dll
Pourtant référencé dans le GAC, il ne devrait pas m'embêter si?
Environnement:
- Windows 7
- Visual Studio 2010 Ultimate
- Appli WPF Framework 3.5
[Npgsql] Besoin d'aide pour l'installer.
× Après avoir cliqué sur "Répondre" vous serez invité à vous connecter pour que votre message soit publié.
× Attention, ce sujet est très ancien. Le déterrer n'est pas forcément approprié. Nous te conseillons de créer un nouveau sujet pour poser ta question.