Forum Discussion
Error connecting Postgres to PowerBI desktop
Hi,
I am trying to connect my PowerBI desktop app to Postgres database and I am getting the following error:
An error happened while reading data from the provider: Could not load file or assembly "System.Runtime.CompilerServices.Unsafe. Version 4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Hi,
Please try and check the below things1) Install latest gateway (if not already installed)
2) Install PostgreSQL driver
3) Create a data source for PostgreSQL in gateway
4) Map data source to Dataset in the dataset settings page
In short, you have to install latest version of NpgSQL and when installing, select the NpgSQL GAC option. The article I linked has a more detailed step-by-step guide.
https://powerbipoint.com/2024/01/22/fix-power-bi-refresh-error-could-not-load-file-or-assembly-or-one-of-its-dependencies-either-a-required-impersonation-level-was-not-provided-or-the-provided-impersonation-level-is-invalid/
1 Reply
- mohitkumawatImpactful Individual
Hi,
Please try and check the below things1) Install latest gateway (if not already installed)
2) Install PostgreSQL driver
3) Create a data source for PostgreSQL in gateway
4) Map data source to Dataset in the dataset settings page
In short, you have to install latest version of NpgSQL and when installing, select the NpgSQL GAC option. The article I linked has a more detailed step-by-step guide.
https://powerbipoint.com/2024/01/22/fix-power-bi-refresh-error-could-not-load-file-or-assembly-or-one-of-its-dependencies-either-a-required-impersonation-level-was-not-provided-or-the-provided-impersonation-level-is-invalid/