Unable to use Npgsql 3.2.3 in LLBLGen 4.2

Posts   
 
    
khorvat avatar
khorvat
User
Posts: 65
Joined: 17-Feb-2011
# Posted on: 14-Jul-2017 10:09:10   

Hi,

can you please help us a bit to get the Npgsql 3.2.3 registered inside the LLBLgen 4.2?

Below you can find the configurations and screenshots.


.NET
machine.config
     <add name="Npgsql Data Provider" invariant="Npgsql" description=.NET Data Provider for PostgreSQL" type="Npgsql.NpgsqlFactory, Npgsql, Version=3.2.3.0, Culture=neutral, PublicKeyToken=5D8B90D52F46FDA7"/></DbProviderFactories>

LLBLGEN
CliRefresher.exe.config and CliGenerator.exe.config
    <add name="PostgreSql Client Data Provider" invariant="Npgsql" description=".Net Framework Data Provider for PostgreSql" type="Npgsql.NpgsqlFactory, Npgsql, Version=3.2.3.0, Culture=neutral, publicKeyToken=5d8b90d52f46fda7"/>

LLBLGenPro.exe.config and LLBLGenPro_x86.exe.config (nothing changed here - see comment phrase)
    <!-- PostgreSql. Uncomment the following line if you're using an Npgsql client version 2.0.x. If you're using v2.1 or higher, leave this line commented out.-->
    <!-- <add name="PostgreSql Client Data Provider" invariant="Npgsql" description=".Net Framework Data Provider for PostgreSql" type="Npgsql.NpgsqlFactory, Npgsql, Version=3.2.3.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7"/>-->

driver.config
    <?xml version="1.0" encoding="utf-8" ?>
    <!-- PostgreSql Database driver settings. -->
    <databaseDriver>
        <shortName>PostgreSql (Npgsql)</shortName>
        <name>PostgreSql 7.4+ Driver (Npgsql)</name>
        <databaseName>PostgreSql 7.x/8.x/9.x</databaseName>
        <databaseShortName>PostgreSql</databaseShortName>
        <assemblyFilename>SD.LLBLGen.Pro.DBDrivers.PostgreSqlDBDriver.dll</assemblyFilename>
        <namespace>SD.LLBLGen.Pro.DBDrivers.PostgreSql</namespace>
        <className>PostgreSqlDBDriver</className>
        <driverID>88EBFD8C-CBDD-4452-88AF-1C99E41A123F</driverID>
        <dynamicQueryEngineNamespace>SD.LLBLGen.Pro.DQE.PostgreSql</dynamicQueryEngineNamespace>
        <templatesRootFolder>Templates</templatesRootFolder>
        <caseSensitiveElementNames>true</caseSensitiveElementNames>
    </databaseDriver>


Thanks

Attachments
Filename File size Added on Approval
LLBLGen-Npgsql-Error.png 53,836 14-Jul-2017 10:09.27 Approved
LLBLGen-PG-Driver.png 32,813 14-Jul-2017 10:09.54 Approved
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 14-Jul-2017 10:59:18   

If there's a machine.config entry, you don't need to alter anything on the llblgenpro side. So leave the line in llblgenpro.exe.config commented out.

The entry in the machine.config file has to be in the .net 4.x version of machine.config. Additionally, the version given 3.2.3 has to be loadable through the GAC. The npgsql installer makes sure of that, but it might be you manually installed all this and didn't add the npgsql dll v3.2.3 to the gac.

In any case, just use the npgsql installer, it will make sure it adds the dll to the gac and to the proper machine.config file.

Frans Bouma | Lead developer LLBLGen Pro