Upgraded Reporting and WPF libraries - Exception

12 posts, 0 answers
  1. Robert
    Robert avatar
    271 posts
    Member since:
    Mar 2011

    Posted 08 Feb 2012 Link to this post

    Hi,

    Ever since I upgraded my application to use the latest versions of the Telerik reporting and WPF tools I get an exception every time I try open a window in my application which uses the reportviewer.

    Upgraded to 2011.3.1116.35 WPF
    Upgraded to 5.3.11.1116 Reporting


    XxmlParserException Occured

    Could not load file or assembly 'Telerik.Windows.Controls.Navigation, Version=2011.3.1116.35, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)  Error at object 'System.Windows.Controls.ControlTemplate' in markup file 'Telerik.ReportViewer.Wpf;component/Themes/Default/ReportViewer.xaml'.

    I used to Auto update feature. I also manually deleted and added the references to see if that worked. No luck.

    Do you have any advice on how I can solve this?

    Thanks,

    Rob
  2. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 08 Feb 2012 Link to this post

    Hello Rob,

    The versions you have listed are correct i.e. the WPF report viewer in Q3 2011 is build against RadControls for WPF v.2011.3.1116.35. You say that you have used the Upgrade Wizard, but note that it only finds and updates Telerik Reporting references. The RadControls for WPF assemblies should be updated manually to the respective version. As per the Deploying WPF Applications help article, the required assemblies are:
    • Telerik.Reporting.dll
    • Telerik.ReportViewer.Wpf.dll
    • Telerik.Reporting.XpsRendering.dll
    • Telerik.Windows.Data.dll
    • Telerik.Windows.Controls.dll
    • Telerik.Windows.Controls.Input.dll
    • Telerik.Windows.Controls.Navigation.dll
    If the problem persists, please open the Visual Studio examples we ship with the product and open the WPF demo to see if you get the same error. If not, then please compare the differences between the demo application and your application.

    Regards,
    Steve
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. DevCraft banner
  4. Robert
    Robert avatar
    271 posts
    Member since:
    Mar 2011

    Posted 08 Feb 2012 Link to this post

    Hi Steve.

    The following items were and are up to date using WPF v2011.3.1220.35 within my application.

    • Telerik.Windows.Data.dll
    • Telerik.Windows.Controls.dll
    • Telerik.Windows.Control.Input.dll
    • Telerik.Windows.Controls.Navigation.dll

    When I did the auto update / convert I updated both reporting and wpf.

  5. Robert
    Robert avatar
    271 posts
    Member since:
    Mar 2011

    Posted 08 Feb 2012 Link to this post

    Ok I upgraded reporting to Q3 SP1. I'n now using references v5.3.12.119 for reporting. However I still have the same error.
  6. Robert
    Robert avatar
    271 posts
    Member since:
    Mar 2011

    Posted 08 Feb 2012 Link to this post

    Why does the exception say the following?

    Could not load file or assembly 'Telerik.Windows.Controls.Navigation, Version=2011.3.1116.35

    I'm using the latest version of WPF references 2011.3.1220.35  and for reporting I'm using 5.3.12.119.
    Why would it be asking for 2011.3.1116.35?

    Rob
  7. Robert
    Robert avatar
    271 posts
    Member since:
    Mar 2011

    Posted 09 Feb 2012 Link to this post

    Let me run over my problems again.
    My application compiles with no errors and runs well until I try to open a new window at runtime which contains the WPF ReportViewer.
    As soon as the report viewer window opens at runtime I get the following error:

    XamlParseException
    Could not load file or assembly 'Telerik.Windows.Controls.Navigation, Version=2011.3.1116.35, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)  Error at object 'System.Windows.Controls.ControlTemplate' in markup file 'Telerik.ReportViewer.Wpf;component/Themes/Default/ReportViewer.xaml'.

    Notice it's trying to look for version 2011.3.1116.35.

    Within Visual Studio 2010 I can view the designer window of the ReportView with no problems.

    These are my references:

    Reporting (Q3 2011 SP1):

    • Telerik.Reporting - 5.3.12.119
    • Telerik.Reporting.OpenXmlRendering - 5.3.12.119
    • Telerik.Reporting.XpsRendering - 5.3.12.119
    • Telerik.ReportViewer.Wpf - 5.3.12.119
    • (non telerik) DocumentFormat.OpenXml - 2.0.5022.0

    WPF:

    • Telerik.Windows.Controls - 2011.3.1220.35
    • Telerik.Windows.Controls.Data - 2011.3.1220.35
    • Telerik.Windows.Controls.Input - 2011.3.1220.35
    • Telerik.Windows.Controls.Navigation - 2011.3.1220.35
    • Telerik.Windows.Data - 2011.3.1220.35
    • Telerik.Windows.Documents - 2011.3.1220.35

    I really don't understand what the problem is.

  8. Robert
    Robert avatar
    271 posts
    Member since:
    Mar 2011

    Posted 09 Feb 2012 Link to this post

    When trying to add a reference in my project version 2011.3.1116.35 is not among those listed. Would that make a difference?
  9. Robert
    Robert avatar
    271 posts
    Member since:
    Mar 2011

    Posted 09 Feb 2012 Link to this post

    Ok I have it working but it seems wrong that it had to be done this way.

    I downloaded just the DLLs from the Telerik website for WPF Version 2011.3.1116.35.

    I replaced all v2011.3.1220.35 DLLs with v2011.3.1116.35 DLLs in my project references and it now works fine.

    Any ideas why I couldn't use the latest WPF DLLs with the Latest version of WPF ReportViewer?

    Thanks for your time.


    **** EDIT ****
    I went into VS2010 editor and the WPF page which has the report viewer now throws an exception at design time.

    Error 1 Could not load file or assembly 'Telerik.Windows.Controls, Version=2011.3.1116.35, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) E:\Software\VB Code\Stately Production System\ProductionControlWPF-2\PrintUnit.xaml 1 1 ProductionControlWPF-2

    It's funny. It either works at design time and not at runtime. Or swapping the DLLs cause it to fail at design time and work at run time.

  10. Robert
    Robert avatar
    271 posts
    Member since:
    Mar 2011

    Posted 10 Feb 2012 Link to this post

    This doesn't quite work to be honest. When I publish the application and try to install it on a different PC a message pops up saying I need the v2011.3.1220.35 libraries. Is there a way to include both the 2011.3.1116 and 2011.3.1220 libraries?
  11. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 11 Feb 2012 Link to this post

    Hi Robert,

    In v. 5.3.12.119 we have not built against the latest WPF controls version, so if you have referenced RadControls for WPF Q3 SP1 (2011.3.1220), you should add binding redirects in order for the viewer to function correctly. For more information refer to How to: Add report viewer to a WPF application Binding Redirects section. If the problem persists, please open a support ticket and attach a sample project that exhibits the problem so we can look into it locally.

    Regards,
    Steve
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  12. Craig Roberts
    Craig Roberts avatar
    4 posts
    Member since:
    Feb 2010

    Posted 14 Feb 2012 Link to this post

    Thanks Steve, I added the code below to my app.config and it works.
    How long do I have to maintain the version numbers in the app.config as I have never had to do this before.

    Regards
    Craig


    <runtime>
         <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
           <dependentAssembly>
             <assemblyIdentity name="Telerik.Windows.Controls" culture="neutral" publicKeyToken="5803cfa389c90ce7"/>
             <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="2011.3.1220.35"/>
           </dependentAssembly>
           <dependentAssembly>
             <assemblyIdentity name="Telerik.Windows.Controls.Input" culture="neutral" publicKeyToken="5803cfa389c90ce7"/>
     
             <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="2011.3.1220.35"/>
           </dependentAssembly>
           <dependentAssembly>
             <assemblyIdentity name="Telerik.Windows.Controls.Navigation" culture="neutral" publicKeyToken="5803cfa389c90ce7"/>
             <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="2011.3.1220.35"/>
           </dependentAssembly>
         </assemblyBinding>
       </runtime>
  13. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 14 Feb 2012 Link to this post

    Hello Craig,

    It depends on whether you would be updating to the new releases of Telerik Reporting and RadControls for WPF. In the Q1 2012 version of Telerik Reporting, we would build against the Q1 2012 of RadControls, so if you upgrade both, you won't need the bindingRedirect.

    All the best,
    Steve
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top
DevCraft banner