Version Mismatch Exception

Invalid assembly version for 'IronInterop' (actual: 2022.x.x.xxxx; expected: 2022.x.x.xxxx). This version of IronPdf requires updated native dependencies. Please clear your build output directory of old assemblies so IronPdf can automatically download the new dependencies at runtime. Alternatively, you may add NuGet package IronPdf.Native.Chrome version 2022.x.xxxx to your project and rebuild.

This error occurs when the IronPdf.Slim package and its dependencies are incompatible due to mismatched versions.

Possible cause

The error typically arises when only the IronPdf.Slim package is updated, while its dependencies remain outdated.

Key dependencies for the IronPdf.Slim package include:

These dependencies may not automatically update with IronPdf.Slim, particularly in older versions.

Solutions

To resolve this issue, consider the following options:

  • Reinstall IronPDF packages: Use NuGet Package Manager in Visual Studio to uninstall all IronPDF-related packages, then reinstall the latest versions. This ensures that old binaries are removed, preventing runtime conflicts. Refer to the NuGet page for compatible dependency versions.
  • Switch to IronPdf: Uninstall IronPdf.Slim and its dependencies, then install the full IronPdf package package. This automatically includes all necessary dependencies with compatible versions.
  • Enable automatic download of dependencies: Uninstall the mentioned dependencies and use IronPdf.Slim with the following code: IronPdf.InstallationAutomaticallyDownloadNativeBinaries = true;. This will download the correct native binaries and dependencies during the initial run. Note that this requires an internet connection and may take some time.

Submit an Engineering Request should you need further assistance.