This is a migrated thread and some comments may be shown as answers.

ThemeResolutionService TypeInitializationException in x64 application

2 Answers 138 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jay
Top achievements
Rank 1
Jay asked on 27 Aug 2020, 02:45 PM
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 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 28 Aug 2020, 08:20 AM
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.

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

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

0
Jay
Top achievements
Rank 1
answered on 28 Aug 2020, 11:54 AM

Dess,

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

Tags
General Discussions
Asked by
Jay
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Jay
Top achievements
Rank 1
Share this question
or