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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
-arantunes-
Regular 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
v-rongtiep-msft
Community Support
Community Support

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
v-rongtiep-msft
Community Support
Community Support

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.