PostGres in Designer

Posts   
 
    
JSobell
User
Posts: 145
Joined: 07-Jan-2006
# Posted on: 21-Mar-2022 12:05:43   

I saw mention that the npgsql DLLs were to be added directly into 5.9. I assume this has been done, but attempting to connect to a PostGres database gives the exception

Exception information.
=============================================================
LLBLGen Pro version: v5.9. Build: 5.9.1

Exception details:
=====================
Message: Could not load file or assembly 'System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Source: Npgsql
Stack trace: 
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<Open>g__OpenLong|0()
   at Npgsql.NpgsqlConnection.Open(Boolean async, CancellationToken cancellationToken)
   at Npgsql.NpgsqlConnection.Open()
   at SD.LLBLGen.Pro.Gui.Controls.WizardPages.MetaDataRetrievalWizard_Step_ConnectionData.TestConnectionData(Boolean showSuccess)

Inner exception: <null>

Do I have to install a specific .Net runtime to resolve this?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39588
Joined: 17-Aug-2003
# Posted on: 21-Mar-2022 12:43:54   

It should be included, the installation tests here shows it is, I tried an installed version and it can connect to the postgresql server just fine.

Could you check if your Drivers\PostgreSql folder contains the Npgsql.dll and the System.Threading.Tasks.Extensions dll (and a couple of other dlls as well)? Also, I assume you haven't build the driver from source nor altered the llblgenpro.exe.config file

Frans Bouma | Lead developer LLBLGen Pro
JSobell
User
Posts: 145
Joined: 07-Jan-2006
# Posted on: 21-Mar-2022 13:45:41   

It does indeed contain all of those DLLs. I installed an old npgsql.msi and that appears to add it to the GAC, which might be why it's now found? Anyway, the error went away, so at least I'm not blocked.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39588
Joined: 17-Aug-2003
# Posted on: 21-Mar-2022 14:43:15   

JSobell wrote:

It does indeed contain all of those DLLs. I installed an old npgsql.msi and that appears to add it to the GAC, which might be why it's now found? Anyway, the error went away, so at least I'm not blocked.

That might have been it indeed, I think v4.x CLR's load an assembly from the gac in all cases even if it's right next to the exe.

Frans Bouma | Lead developer LLBLGen Pro