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

[Solved] Unable to load one or more of the requested types

9 Answers 325 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Albert
Top achievements
Rank 1
Albert asked on 22 Nov 2010, 02:25 PM
Hello ,

I am using rad rich text box in my application . Right now when I started type in  rich text box and right click on it ,then it gives me following error.
If anyone knows what is the issue then please  tell me.

Error : Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

Stack Trace : 

   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.RuntimeModule.GetTypes()
   at System.Reflection.Assembly.GetTypes()
   at System.ComponentModel.Composition.Hosting.AssemblyCatalog.get_InnerCatalog()
   at System.ComponentModel.Composition.Hosting.AssemblyCatalog.GetExports(ImportDefinition definition)
   at System.ComponentModel.Composition.Hosting.AggregateCatalog.GetExports(ImportDefinition definition)
   at System.ComponentModel.Composition.Hosting.CatalogExportProvider.GetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1& exports)
   at System.ComponentModel.Composition.Hosting.ExportProvider.GetExports(ImportDefinition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.AggregateExportProvider.GetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1& exports)
   at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExports(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1& exports)
   at System.ComponentModel.Composition.Hosting.CompositionContainer.GetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1& exports)
   at System.ComponentModel.Composition.Hosting.ExportProvider.GetExports(ImportDefinition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.ImportEngine.TryGetExports(ExportProvider provider, ComposablePart part, ImportDefinition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.ImportEngine.TrySatisfyImportSubset(PartManager partManager, IEnumerable`1 imports, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.ImportEngine.TrySatisfyImportsStateMachine(PartManager partManager, ComposablePart part)
   at System.ComponentModel.Composition.Hosting.ImportEngine.TrySatisfyImports(PartManager partManager, ComposablePart part, Boolean shouldTrackImports)
   at System.ComponentModel.Composition.Hosting.ImportEngine.SatisfyImports(ComposablePart part)
   at System.ComponentModel.Composition.Hosting.ComposablePartExportProvider.<>c__DisplayClass2.<Compose>b__0()
   at System.ComponentModel.Composition.Hosting.CompositionServices.TryInvoke(Action action)
   at System.ComponentModel.Composition.Hosting.ComposablePartExportProvider.Compose(CompositionBatch batch)
   at System.ComponentModel.Composition.Hosting.CompositionContainer.Compose(CompositionBatch batch)
   at System.ComponentModel.Composition.CompositionInitializer.SatisfyImports(ComposablePart part)
   at System.ComponentModel.Composition.CompositionInitializer.SatisfyImports(Object attributedPart)
   at Telerik.Windows.Documents.UI.Extensibility.UIExtensibilityManager.AssureImportsAreSatisfied()
   at Telerik.Windows.Documents.UI.Extensibility.UIExtensibilityManager.GetSelectionMiniToolBar()
   at Telerik.Windows.Controls.RadRichTextBox.get_SelectionMiniToolBar()
   at Telerik.Windows.Controls.RichTextBoxUI.ContextMenu.ShowMenu(Point location, RadRichTextBox radRichTextBox, WordInfo incorrectWordInfo)
   at Telerik.Windows.Controls.RichTextBoxUI.ContextMenu.Show(Point location, RadRichTextBox radRichTextBox, WordInfo incorrectWordInfo)
   at Telerik.Windows.Controls.RadRichTextBox.ShowContextMenuAtDocumentPosition(Point proposedLocation, DocumentPosition position)
   at Telerik.Windows.Documents.UI.DocumentPresenterBase.Owner_MouseRightButtonUp(Object sender, MouseButtonEventArgs e)
   at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
   at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)


-Thanks

9 Answers, 1 is accepted

Sort by
0
Ivailo Karamanolev
Telerik team
answered on 22 Nov 2010, 03:38 PM
Hi Albert,

The main assembly, Telerik.Windows.Documents.dll contains only the interfaces for the context menu and the floating toolbar. We have provided an implementation of these inside a satellite assembly, Telerik.Windows.Controls.RichTextBoxUI.dll. It's automatically loaded through MEF, so the only thing you should do is add a reference to this assembly and the exception should go away.

Best wishes,
Ivailo
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Albert
Top achievements
Rank 1
answered on 23 Nov 2010, 09:50 AM
I have both of that references added in my project.Still I am getting same error. Since last few days I am trying to solve this error but can't get any solution yet .

-Thanks

0
Iva Toteva
Telerik team
answered on 24 Nov 2010, 02:39 PM
Hi Albert,

We are unable to reproduce this issue on our part.
You can check if all assembly versions are the same or even delete the obj and bin folders, clean the solution and reset the references, making sure that they point to the latest binaries.
But once again, we are just shooting in the dark because we are not able to reproduce the problem. We are also not aware of any other similar cases with other customers. It would be very helpful if you could send over a sample project illustrating the problem.
Looking forward to hearing from you again.

Greetings,
Iva
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Nirmala
Top achievements
Rank 1
answered on 03 Jan 2011, 11:34 PM
I ran into same issue and had to add reference to Microsoft.Silverlight.Testing (\Microsoft SDKs\Silverlight\v4.0\Toolkit\Apr10\Testing folder) to get RichTextBox to work smoothly. There are performance issues though. (slow typing)
0
Iva Toteva
Telerik team
answered on 04 Jan 2011, 11:20 AM
Hi Nimrala,

Thank you for your involvement and the valuable feedback. 
Indeed, there is an assembly that depends on Microsoft.Silverlight.Testing in the suite RadControls for Silverlight. That assembly is Telerik.Silverlight.Controls.Test.Common but it has little to do with RadRichTextBox. If you are not using Telerik's testing framework, you can remove both references from your project.
Overall, we highly recommend the removal of all unneeded assembly references.

Kind regards,
Iva
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Rodion
Top achievements
Rank 1
answered on 17 Jan 2011, 09:21 AM
I ran into the same problem and having to add Microsoft.Testing dll sounds very counter intuitive...
0
Iva Toteva
Telerik team
answered on 18 Jan 2011, 03:04 PM
Hi Rodion,

I agree with you that it is not intuitive. The issue stems from the fact that the assembly Telerik.Silverlight.Controls.Test.Common should not be referenced in the first place, except in a unit testing project, which I assume yours isn't. Inside one, having a dependency on Microsoft.Testing is expected. Once you remove the unneeded reference to Telerik.Silverlight.Controls.Test.Common, the problem should be resolved.
If you have any other questions, do not hesitate to contact us again.

Kind regards,
Iva
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Tadeusz Dracz
Top achievements
Rank 1
answered on 04 Feb 2011, 11:52 AM
To fix that in my case, I needed to disable spell checking on the rich text box (I didn't use it and I didn't have an appropriate DLL referenced).
0
Shawn
Top achievements
Rank 1
answered on 14 Feb 2011, 08:44 PM
I had the same error message and was able to correct it by adding the reference to Microsoft.Silverlight.Testing
I am using Telerik Q3 SP 1
Tags
RichTextBox
Asked by
Albert
Top achievements
Rank 1
Answers by
Ivailo Karamanolev
Telerik team
Albert
Top achievements
Rank 1
Iva Toteva
Telerik team
Nirmala
Top achievements
Rank 1
Rodion
Top achievements
Rank 1
Tadeusz Dracz
Top achievements
Rank 1
Shawn
Top achievements
Rank 1
Share this question
or