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

Could not load file or assembly Telerik.WinControls.XmlSerializers

4 Answers 1072 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Ali Jobran
Top achievements
Rank 1
Ali Jobran asked on 05 Dec 2017, 06:48 PM

I have a WinForms Window with gridview in it And When this window opens, the following Exception appears

 

Exception: Exception thrown: 'System.IO.FileNotFoundException' in mscorlib.dll ("Could not load file or assembly 'Telerik.WinControls.XmlSerializers, Version=2017.3.912.40, Culture=neutral' or one of its dependencies. The system cannot find the file specified."). Exception thrown: 'System.IO.FileNotFoundException' in mscorlib.dll ("Could not load file or assembly 'Telerik.WinControls.XmlSerializers, Version=2017.3.912.40, Culture=neutral, PublicKeyToken=a4675be94ecbc7b2' or one of its dependencies. The system cannot find the file specified.")

 

 

Whether The App is in the Debug mode or Release mode
How to solve this problem

Thank you very much in advance.

4 Answers, 1 is accepted

Sort by
-1
Accepted
Dimitar
Telerik team
answered on 06 Dec 2017, 07:59 AM
Hi Ali,

You can ignore this exception. Detailed information is available here: Could not load file or assembly Telerik.WinControls.XmlSerializers - Telerik UI for WinForms - KB.

I hope this will be useful. Let me know if you have additional questions.

Regards,
Dimitar
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tom
Top achievements
Rank 1
commented on 16 Oct 2023, 01:53 PM

Why would I want to 'ignore' ALL assembly load exceptions just to make this one Telerik control function correctly? In my case this is being thrown from RadImageShape.cs on line 640 during the initialization of RichTextEditor: 
`RadImageShape result = new XmlSerializer(typeof(RadImageShape)).Deserialize(xmlTextReader) as RadImageShape;` It's not as though throwing an exception couldn't be avoided here, or at least caught. What a time waster. I keep forgetting that this bug exists, and have had to hunt it down on different occasions. 
Dess | Tech Support Engineer, Principal
Telerik team
commented on 19 Oct 2023, 09:00 AM

Hi, Tom,

I am sorry to hear that you are facing any difficulties with the Telerik UI for WinForms suite. Since this forum thread and referred KB article are quite old, I would like to ensure that you encounter exactly the same case or it is a new scenario with the latest version of the Telerik UI for WinForms suite. Could you please elaborate? Could you please specify the exact steps how to reproduce the problem? Thus, we would get better understanding of the precise case and provide further assistance. Thank you in advance.

Tom
Top achievements
Rank 1
commented on 19 Oct 2023, 05:04 PM

Oh hi Dess! I thought I'd be talking to myself on a 6 y.o. thread. You can try to repro using this minimal sample. Just click on **Exception Settings\Common Runtime Language Exceptions** so that it shows âœ” then run the main form. That said, based on the thread activity, this doesn't seem to be bothering a lot of people but at least next time I run into it I'll find my own comment and resolve it quicker! It's really, _really_ ok if this doesn't rise to the top of the support queue. Thx for your kind response!
Dess | Tech Support Engineer, Principal
Telerik team
commented on 23 Oct 2023, 11:06 AM

Tom, Thank you for the sample project. Indeed, if the "Common Language Runtime Exceptions" are enabled, it is possible to experience such a behavior:

However, it doesn't break the application exception and the user can proceed with the execution. This exception is a part of the XmlSerializer's normal  operation as it is explained in the referred forum thread.

0
Ali Jobran
Top achievements
Rank 1
answered on 06 Dec 2017, 05:16 PM
Thanks a lot Dimitar 
0
Hamid
Top achievements
Rank 1
answered on 08 Oct 2018, 09:38 AM
If it's an issue, I prefer to get a solution instead of a workaround!
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 08 Oct 2018, 10:30 AM
Hello, Hamid, 

Although this behavior may seem like an issue, it is the normal behavior of .NET Framework and it is expected. Here is a quote from the MSDN Forums regarding this exception:
"This exception is a part of the XmlSerializer's normal operation. It is expected and will be caught and handled inside of the Framework code. Just ignore it and continue. If it bothers you during debugging, set the Visual Studio debugger to only stop on unhandled exceptions instead of all exceptions." 

Additional information is available in the previously referred KB article.

I hope this information helps.

Regards,
Dess
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
GridView
Asked by
Ali Jobran
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Ali Jobran
Top achievements
Rank 1
Hamid
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or