Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
-arantunes-
Frequent Visitor

Error when updating data using PostgreSQL

After updating the last version of Power BI, I can not update data using the data source PostgreSQL. It gives me the following error:

DataSource.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)'. 

If I reinstall previous versions, I won't have this problem. How can I solve this issue?

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @-arantunes- ,

Please refer to :

1) 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-on...

More details: Solved: Error connecting Postgres to PowerBI desktop - Microsoft Fabric Community

 

Best Regards
Community Support Team _ Rongtie

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @-arantunes- ,

Please refer to :

1) 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-on...

More details: Solved: Error connecting Postgres to PowerBI desktop - Microsoft Fabric Community

 

Best Regards
Community Support Team _ Rongtie

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

Find out what's new and trending in the Fabric community.

Top Kudoed Authors