LLBLGen 4.2 with Postgres 9.4

Posts   
 
    
october83
User
Posts: 7
Joined: 27-Nov-2015
# Posted on: 18-Dec-2015 08:39:22   

Hi,

I using LLBLGen version 4.2 for Postgres Sql ver 9.4, but not worked.

This error message for Test Connection: (I choised Target Framework: LLBLGen Pro Runtime Framework)

Exception message:

Exception type: ConfigurationErrorsException Failed to find or load the registered .Net Framework Data Provider.

Please help me ?

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 18-Dec-2015 09:00:44   

Quoting the docs:

To make the designer work with the Npgsql ADO.NET provider installed on your system, make sure the DbProviderFactory declaration for the Npsql ADO.NET provider in the LLBLGenPro.exe.config file in the LLBLGen Pro installation folder matches the version and file path of your system. The Npsql ADO.NET provider doesn't install itself in the machine.config so its DbProviderFactory isn't known by the .NET CLR and has to be defined on a per-application basis through the application's .config file.

october83
User
Posts: 7
Joined: 27-Nov-2015
# Posted on: 18-Dec-2015 09:34:37   

Walaa wrote:

Quoting the docs:

To make the designer work with the Npgsql ADO.NET provider installed on your system, make sure the DbProviderFactory declaration for the Npsql ADO.NET provider in the LLBLGenPro.exe.config file in the LLBLGen Pro installation folder matches the version and file path of your system. The Npsql ADO.NET provider doesn't install itself in the machine.config so its DbProviderFactory isn't known by the .NET CLR and has to be defined on a per-application basis through the application's .config file.

Thanks Walaa!

I edited the LLBLGenPro.exe.config of folder LLBL Gen 4.2, this content:

<!-- 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, [b]Version=2.2.1.0, [/b]Culture=neutral, PublicKeyToken=5d8b90d52f46fda7"/> </DbProviderFactories>

But it not working.?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 18-Dec-2015 10:45:50   

what version of npgsql did you install? You have to specify that version in that line. Also if you used the npgsql installer, it's added to the GAC. If not, (you downloaded a zip file), it's not added to the gac and you have to manually add it to the gac.

Newer versions of npgsql come with an installer which already registers the dll with .net's machine.config, so you don't need to use that line in the config file.

Frans Bouma | Lead developer LLBLGen Pro
october83
User
Posts: 7
Joined: 27-Nov-2015
# Posted on: 18-Dec-2015 16:55:19   

Otis wrote:

what version of npgsql did you install? You have to specify that version in that line. Also if you used the npgsql installer, it's added to the GAC. If not, (you downloaded a zip file), it's not added to the gac and you have to manually add it to the gac.

Newer versions of npgsql come with an installer which already registers the dll with .net's machine.config, so you don't need to use that line in the config file.

I install Npgsql 2.2.4.2-2

So, i must to do?

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 19-Dec-2015 03:19:23   

Put that version number in the line you added to the config.

Did it worked?

David Elizondo | LLBLGen Support Team
october83
User
Posts: 7
Joined: 27-Nov-2015
# Posted on: 19-Dec-2015 03:55:31   

I have do it, but not worked.

This message error:

Exception message:

Exception type: ConfigurationErrorsException Failed to find or load the registered .Net Framework Data Provider.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 19-Dec-2015 10:44:33   

Please use this version: https://github.com/npgsql/npgsql/releases/tag/v2.2.5 and grab the .exe for the .NET version you're using. Our designer is a .net 4 application so you should at least install a .net 4.0 version.

If you want to setup the stuff manually, please see: http://www.npgsql.org/doc/ddex.html

Frans Bouma | Lead developer LLBLGen Pro
october83
User
Posts: 7
Joined: 27-Nov-2015
# Posted on: 21-Dec-2015 07:58:55   

Otis wrote:

Please use this version: https://github.com/npgsql/npgsql/releases/tag/v2.2.5 and grab the .exe for the .NET version you're using. Our designer is a .net 4 application so you should at least install a .net 4.0 version.

If you want to setup the stuff manually, please see: http://www.npgsql.org/doc/ddex.html

Thanks Otis,

I was installed v2.2.5 and edit LLBLGenPro.exe.config this: <add name="PostgreSql Client Data Provider" invariant="Npgsql" description=".Net Framework Data Provider for PostgreSql" type="Npgsql.NpgsqlFactory, Npgsql, [b]Version=2.2.5.0[/b], Culture=neutral, PublicKeyToken=5d8b90d52f46fda7"/>

But, it not working and show message

Exception message:

Exception type: ConfigurationErrorsException An error occurred creating the configuration section handler for system.data: Column 'InvariantName' is constrained to be unique. Value 'Npgsql' is already present. (C:\Program Files (x86)\Solutions Design\LLBLGen Pro v4.2\LLBLGenPro.exe.Config line 70)

Inner Exception message:

Column 'InvariantName' is constrained to be unique. Value 'Npgsql' is already present.

october83
User
Posts: 7
Joined: 27-Nov-2015
# Posted on: 21-Dec-2015 08:05:20   

My attachment file show error.

Attachments
Filename File size Added on Approval
llbl.jpg 264,577 21-Dec-2015 08:05.26 Approved
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 21-Dec-2015 10:04:49   

october83 wrote:

Otis wrote:

Please use this version: https://github.com/npgsql/npgsql/releases/tag/v2.2.5 and grab the .exe for the .NET version you're using. Our designer is a .net 4 application so you should at least install a .net 4.0 version.

If you want to setup the stuff manually, please see: http://www.npgsql.org/doc/ddex.html

Thanks Otis,

I was installed v2.2.5 and edit LLBLGenPro.exe.config this: <add name="PostgreSql Client Data Provider" invariant="Npgsql" description=".Net Framework Data Provider for PostgreSql" type="Npgsql.NpgsqlFactory, Npgsql, [b]Version=2.2.5.0[/b], Culture=neutral, PublicKeyToken=5d8b90d52f46fda7"/>

But, it not working and show message

Exception message:

Exception type: ConfigurationErrorsException An error occurred creating the configuration section handler for system.data: Column 'InvariantName' is constrained to be unique. Value 'Npgsql' is already present. (C:\Program Files (x86)\Solutions Design\LLBLGen Pro v4.2\LLBLGenPro.exe.Config line 70)

Inner Exception message:

Column 'InvariantName' is constrained to be unique. Value 'Npgsql' is already present.

Yes, that's expected, sorry I didn't explain that you should leave the line commented out after that flushed . You can simply leave the line commented out in the llblgenpro.exe.config file, as the installer you used already has added that same line to the machine.config file. So comment out the line in llblgenpro.exe.config and it should work now.

Frans Bouma | Lead developer LLBLGen Pro
october83
User
Posts: 7
Joined: 27-Nov-2015
# Posted on: 21-Dec-2015 10:35:06   

Thanks Otis simple_smile

My problem is solved!

Again, thanks a lot!