I have upgraded application to .Net 6.0 ,facing TypeInitializationException: The type initializer for 'Telerik.Windows.Controls.TelerikLicense' threw an exception.

0 Answers 913 Views
EntityFrameworkDataSource RadialMenu
Akshay
Top achievements
Rank 1
Akshay asked on 18 Feb 2022, 03:56 AM

Hello, I have upgraded application to .Net 6.0 ,while I trying to add DLL to toolbar then it gives following error [refer screenshot].

when I run the project it throws exception about Telerik,  as

The invocation of the constructor on type 'Telerik.Windows.Controls.RadMenu' that matches the specified binding constraints threw an exception

following inner exception

" TypeInitializationException: The type initializer for 'Telerik.Windows.Controls.TelerikLicense' threw an exception."

and

"MissingMethodException: Method not found: 'System.ActivationContext System.AppDomain.get_ActivationContext()'."

 

please suggest.

Stenly
Telerik team
commented on 22 Feb 2022, 07:21 PM

Could you provide a bit more information regarding this exception? Also, is it reproducible in a sample project, or only in your main application? If it is only in your main project, could you try isolating it, so I could try to debug it on my end?
Markus Hopfenspirger
Top achievements
Rank 2
commented on 09 Jul 2022, 07:33 AM

I had this problem too - referencing the Telerik .dlls from Binaries/WPF60 and not from Binaries/WPF45 solved it in my case...
George
Top achievements
Rank 1
commented on 02 Sep 2022, 09:29 AM

I have the same issue.

I have upgraded an application to WPF Core .Net 6.0 and get the same error for the RadComboBox.

Is there some update on that?

Stenly
Telerik team
commented on 07 Sep 2022, 08:43 AM

When migrating a project from a .Net Framework version to a .Net one (3.1 and above) an additional NuGet package would have to be manually included, which is Microsoft.Windows.Compatibility. This additional step should be performed when the Telerik assemblies are not installed via NuGet packages. If the assemblies are included via NuGet packages, there would be no need to include the Microsoft.Windows.Compatibility package.

With this in mind, may I ask if you could try including this additional package?
Carl
Top achievements
Rank 1
commented on 16 Aug 2023, 04:54 PM

I am getting the same exception when i upgraded to .NET 7.0. Anybody knows the fix.  The above solutions didn't work for me.
Stenly
Telerik team
commented on 18 Aug 2023, 05:04 PM

Could you share a sample project that reproduces this behavior? This way, I could review it on my end and let you know what could be the cause.

No answers yet. Maybe you can help?

Tags
EntityFrameworkDataSource RadialMenu
Asked by
Akshay
Top achievements
Rank 1
Share this question
or