New to Telerik Reporting? Download free 30-day trial

WPF Report viewer is throwing exception "Could not load file or assembly 'Telerik.Windows.Controls.Navigation, Version=2018.2.620.40"

Environment

Product Progress® Telerik® Reporting
Report Viewers WPF

Description

Telerik.Reporting.Wpf is build with Telerik UI for WPF assemblies for.NET 4.0. When referencing the Telerik UI for WPF assemblies build with .NET 4.5 an exception is thrown "Could not load file or assembly 'Telerik.Windows.Controls.Navigation, Version=2018.2.620.40"

Solution

In order to use the Telerik UI for WPF assemblies build with .NET 4.5 binding redirects are required. Here are the binding redirects needed to use the Telerik Reporting WPF Report Viewer with Telerik UI for WPF build with .NET 4.5 (2018.2.620.45). Just replace the versions with the assemblies version used in the application:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Telerik.Windows.Controls"
                          publicKeyToken="5803cfa389c90ce7"
                          culture="neutral" />
        <bindingRedirect oldVersion="2018.2.620.40"
                         newVersion="2018.2.620.45"/>
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Telerik.Windows.Controls.Navigation"
                          publicKeyToken="5803cfa389c90ce7"
                          culture="neutral" />
        <bindingRedirect oldVersion="2018.2.620.40"
                         newVersion="2018.2.620.45"/>
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Telerik.Windows.Controls.Input"
                          publicKeyToken="5803cfa389c90ce7"
                          culture="neutral" />
        <bindingRedirect oldVersion="2018.2.620.40"
                         newVersion="2018.2.620.45"/>
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Telerik.Windows.Data"
                          publicKeyToken="5803cfa389c90ce7"
                          culture="neutral" />
        <bindingRedirect oldVersion="2018.2.620.40"
                         newVersion="2018.2.620.45"/>
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
....
In this article