Connect to Postgresql from Strategy: Could not load file or assembly Npgsql
Author: Supersol
Creation Date: 6/30/2017 2:56 PM
profile picture

Supersol

#1
Hi,

We upgraded to WIN10, but now my reference in my wealth labe code
CODE:
Please log in to see this code.
doesnt work anymore. Error message is:

Error processing symbol TXN Could not load file or assembly 'Npgsql, Version=2.0.13.91, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7' or one of its dependencies. The system cannot find the file specified.

Guess it has something to do with the newer .net framework of win10? So i took a newer npqsql.dll, but still no luck:

"Error processing symbol SCHW Could not load file or assembly 'Npgsql, Version=3.2.4.1, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7' or one of its dependencies. The system cannot find the file specified."

any ideas?
thx
alex
profile picture

Eugene

#2
Hi,

Try this:

1. It's pretty obvious but you should check the file location first. Does it still exist there? What about its dependencies without which Npgsql may fail to load itself?

2. Delete references in the Editor and add them again manually

3. If nothing works put all the required files in Wealth-Lab's main folder under Program Files\MS123\Wealth-Lab Developer 6 (root folder, not a subfolder). In this case even a reference isn't required.

P.S. Did you know that you can work with PostgreSQL databases using our Database provider extension?
profile picture

Supersol

#3
Hi Eugene,

Copying to root folder helped, although i dont get it, as external references shouldnt be requried to reside in root..

add database provider: yes, but as i am writing in the code to the DB, too, i thought it wouldn't make sense to use the database provider, right?

thx
alex
profile picture

Eugene

#4
QUOTE:
Copying to root folder helped, although i dont get it, as external references shouldnt be requried to reside in root..

I'm happy that it works for you. Yes, shouldn't be required. An alternative is to install assembly into the GAC.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).