Power BI Refresh Error:
TypeInitializationException
What does this error mean?
A required .NET assembly or its dependency could not be loaded during type initialization on the Self-Hosted IR node, commonly triggered by a missing or conflicting System.ValueTuple.dll when using connectors such as PostgreSQL (Npgsql).
Common causes
- 1System.ValueTuple.dll or another required .NET assembly is missing from the IR node's Global Assembly Cache (GAC) or install directory
- 2A .NET Framework version mismatch between what Npgsql (or another driver) expects and what is installed on the IR host machine
- 3Corrupted or incomplete Self-Hosted IR installation that left driver dependencies in a broken state
- 4Conflicting versions of the same assembly registered in both %windir%\Microsoft.NET\assembly and %windir%\assembly
How to fix it
- 1Step 1: Identify the missing assembly from the exception message (e.g., System.ValueTuple, Version=4.0.2.0) and confirm it is absent from the IR install folder at C:\Program Files\Microsoft Integration Runtime\4.0\Gateway\.
- 2Step 2: Download the correct version of the missing assembly (e.g., install the Microsoft.Bcl.AsyncInterfaces or System.ValueTuple NuGet package) and place the DLL in the Gateway folder, or install the appropriate .NET Framework version on the host machine.
- 3Step 3: If the assembly exists in %windir%\Microsoft.NET\assembly or %windir%\assembly but the IR still cannot find it, copy the DLL directly into the IR Gateway folder to override GAC resolution.
- 4Step 4: Restart the Self-Hosted Integration Runtime service via the Configuration Manager or Windows Services after placing the DLL.
- 5Step 5: Re-run the failed pipeline activity and verify the error is resolved; if it persists, reinstall the Self-Hosted IR completely to restore all default dependencies.