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

System.TypeLoadException

1 Answer 159 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 16 Jan 2011, 06:36 AM
Hi folks - this is a repost of something I sent to Telerik support.  They responded with the standard RTFM response. Has anyone else seen this error?
-----------------------------------
I am working with a project and was using the trial version of reports. Everything was working fine. I upgraded to the purchased version, and I'm now getting the error below.

The steps I took to upgrade included:

Uninstalling trial version
Installing purchased version
Removed all old references from projects
Added new references and set copy local to true
Rebuild all

The project starts fine - and the viewer loads fine - but when I load a report, I get the following error (I actually get three of them - for different "renderers").  If I continue, the report works fine.  Any thoughts?

Error:
System.TypeLoadException crossed a native/managed boundary
  Message=Could not load type 'Telerik.Reporting.XamlRendering.SilverlightXamlRenderer' from assembly 'Telerik.Reporting, Version=4.2.10.1221, Culture=neutral, PublicKeyToken=a9d7983dfcc261be'.
  Source=mscorlib
  TypeName=Telerik.Reporting.XamlRendering.SilverlightXamlRenderer
  StackTrace:
       at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, Boolean loadTypeFromPartialName, ObjectHandleOnStack type)
       at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName)
       at System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
       at System.Type.GetType(String typeName, Boolean throwOnError)
       at Telerik.Reporting.Processing.ExtensionManagerBase.CreateExtensionInfo(String typeName, String extensionName)
  InnerException:

Thanks.

1 Answer, 1 is accepted

Sort by
0
Robert
Top achievements
Rank 1
answered on 18 Jan 2011, 06:37 PM
Since I posted my original disappointment with the response, I thought it only fair to post and mention that Telerik came through with the answer. This is resolved - hoping to save everyone else a few hours...

From Telerik:

We have further investigated the issue and found out that we do have such exception that we handle. For compatibility reasons Telerik Reporting is build against .Net 2.0 but the XAML rendering requires .Net 3.5. This is why we have separated the XAML rendering from the Telerik.Reporting assembly. However we do have plans once .Net 3.5 is  largely accepted to migrate to .Net 3.5. Once we migrate Telerik.Reporting to .Net 3.5 we will merge the Telerik.Reporting.XamlRendering and Telerik.Reporting assemblies in order to ease our customer from adding additional assembly. This is why we are trying to load the Telerik.Reporting.XamlRendering.SilverlightXamlRenderer type from the Telerik.Reporting and an exception is thrown that we handle internally. This is all preparation for the future migration to a greater version of .Net. Because we handle that exception we presume that you have enabled the First Chance Exceptions from the Debug menu, select Exceptions (or use Ctrl+D,E from the keyboard). If this is the case you don't have to worry about that exception because we do handle it and your clients will not be affected. 

My added notes:
To completely disable the break in VS 2010, you have to also go to Debug/Options/Debugging/General and disable "Break when exceptions cross AppDomain or managed/native boundaries (Managed Only)"
Tags
General Discussions
Asked by
Robert
Top achievements
Rank 1
Answers by
Robert
Top achievements
Rank 1
Share this question
or