ThemeResolutionService TypeInitializationException in x64 application

3 posts, 0 answers
  1. Jay
    Jay avatar
    13 posts
    Member since:
    Mar 2019

    Posted 27 Aug 2020 Link to this post

    I have a Telerik UI for WinForms application that builds and runs fine when targeting the x86 platform. As soon as I change the target platform to x64 the same application will build without issue, but the application will throw an exception when running in Debug mode, stopping on the ThemeResolutionService with a type initialization error. My application is using the 2020.2.616.40 version of the controls and .NET Framework 4.6.1. All application themes are set to "ControlDefault", so this should not be an issue.
  2. Dess | Tech Support Engineer, Sr.
    Dess | Tech Support Engineer, Sr.  avatar
    4176 posts

    Posted 28 Aug 2020 Link to this post

    Hello, Jay,

    Following the provided information, I have tried to replicate the error locally:

    However, I was unable to observe the same behavior on my end.

    I have attached my sample project for your reference. Could you please give it a try and see how it works on your end? Do I need to perform any changes in the project?

    Could you please ensure that the references to all Telerik controls in your project are the same version considering the suffix as well (.20 or .40). Better yet, you can remove all references and add them anew by using the DLLs from your latest installation. Delete the license.licx file. After that, you should rebuild your project, close Visual Studio and open it again to make sure that no references are kept in the memory by Visual Studio.  

    I am looking forward to your reply.

    Dess | Tech Support Engineer, Sr.
    Progress Telerik

    Five days of Blazor, Angular, React, and Xamarin experts live-coding on , special prizes and more, for FREE?! Register now for DevReach 2.0(20).

  3. Jay
    Jay avatar
    13 posts
    Member since:
    Mar 2019

    Posted 28 Aug 2020 in reply to Dess | Tech Support Engineer, Sr. Link to this post


    Thank you for your reply. I was able to get my project to compile and run in x64 mode after removing the DLL references and adding them back in from the latest version. It looks like one of the DLLs that was being referenced was stuck on an older version.

    Jay Hammer

Back to Top