metricsign
Start free
High severityconfigurationAzure Data Factory

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

  1. 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\.
  2. 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.
  3. 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.
  4. 4Step 4: Restart the Self-Hosted Integration Runtime service via the Configuration Manager or Windows Services after placing the DLL.
  5. 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.

Frequently asked questions

Why does System.ValueTuple.dll appear in the Windows assembly cache but still cause a FileNotFoundException?

The .NET runtime may resolve assemblies differently depending on the application's binding configuration. The IR process may require a specific version that differs from the one cached in the GAC, so placing the exact required version directly in the IR Gateway folder takes precedence and resolves the conflict.

Does this error affect all connectors on the IR node or just PostgreSQL?

It typically affects only connectors that depend on the missing assembly. In this case, only Npgsql-based (PostgreSQL) connections fail. Other connectors with different dependency trees will continue to work normally.

Other configuration errors