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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
aibatalov
Advocate I
Advocate I

Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe while refresh in service

Yesterday all working fine, but today refresh failed in all our reports in PowerBI service (we haven't changed reports since yesterday).

 

Same error in all reports:

An error happened while reading data from the provider: 'Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.0, 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)'

 

Reports contains PostgreSQL and web contents datasources.

What can we do to fix this?

41 REPLIES 41
Nik93
New Member

Are there any other solutions? Tried the below but still receive the same error...

PakthurYangu
Helper I
Helper I

I wasted a few days looking for a solution until I came across this article.

In short, you have to install version 4.0.10 of NpgSQL and when installing, select the NpgSQL GAC option. The article I linked has a more detailed step-by-step guide.

PakthurYangu
Helper I
Helper I

I wasted a few days looking for a solution until I came across this article.

In short, you have to install version 4.0.10 of NpgSQL and when installing, select the NpgSQL GAC option. The article I linked has a more detailed step-by-step guide.

LinqLover
Frequent Visitor

The problem came back to us today after 3 years, any other known workarounds? We are hosting postgresql ourselves.

shubhamamilkant
Helper II
Helper II

Workaround for now: 

1) Install 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

lguima
Frequent Visitor

Same issue here. 09/01/2021

Anonymous
Not applicable

Still running into this issue (8/30/2021)

ysanabria
Frequent Visitor

Me too and still waiting for Microsoft support request 😥

Same, I am still having this issue. 

any solutions? 

grayl
Regular Visitor

Same issue here running postgres via postgres for azure service.

Anonymous
Not applicable

Thanks MS for the fix,

But, hey! Since we all use Postgres, I want to make everyone aware of the TimescaleDB extension we have available. Timescale recently released v1.7, but as of v1.5 they implemented native database compression with a ratio of about 20:1. You can learn about it here.

 

Unfortunately, Azure's Postgres Service only supports v1.3.2 - please upvote this idea if you want to massively increase your PostgreSQL server's performance. If you're using a VM - get it already!

LinqLover
Frequent Visitor

Update for everyone other who did not observe the service page: The issue has been fixed until last night. Postgres datasets updates works again. 🎉

felipepereira
New Member

This is unbelievable. It seems they are always trying to sabotage Postgres users. I am facing the same issue and it started on the same day.

periyasingh
New Member

Hi,

Same issue is coming for me too. The on-demand and scheduled data refresh in power bi server was working fine beforehand, now getting issue since monday. Still no issue in loading and refreshing data from the same source in Power BI desktop.

 

I am using postgresql azure PaaS database. The issue i am getting is :

An error happened while reading data from the provider: 'Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=x.x.x.x, Culture=neutral, PublicKeyToken=xxxxxxxxxx' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)' 

I'm having the same issue, in power BI desktop work fine but in PBI Web not synchronize

 

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

moka
Frequent Visitor

Hi @aibatalov 

I just had the same problem because I was not using a Gateway Connection. 
I solved the problem by enabling a Gateway and installing npgsql v4.0.10 on it.

Hope it helps somehow!

ALWI
Frequent Visitor

I got a call from Microsoft the issue is on the awareness list: https://powerbi.microsoft.com/en-us/support/

tomkvarby
Advocate I
Advocate I

Same issue here. No gateway. Can't see any data.

Anonymous
Not applicable

Same issue here, Postgresql DB on Azure server, no gateway, failing on all reports. All of them are either import-only or mixed-mode storage.

Anonymous
Not applicable

I have been experiencing the same problem for a few days. Hosting a Postgresql as a Database-as-a-service on Azure. Not using any gateway.

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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

Top Solution Authors
Top Kudoed Authors