Cannot Find DLLs in Referenced Sub-Directory

2 posts, 0 answers
  1. Sandra
    Sandra avatar
    16 posts
    Member since:
    Sep 2011

    Posted 10 Feb 2014 Link to this post

    We are using the RadRichTextBox for a TextEditor and ran into an issue where we could freely paste content that was copied from inside of our editor but could not paste from external sources (Word, Notepad, etc.). I did some searching and found which tells me that the FormatProviders DLLs have to be "referenced" by the application.

    I go digging and find that I do indeed have the DLLs included with my application but they are in a sub-folder named Common. I have many other DLLs also in the Common sub-folder and all are loading fine via the app.config entry <probing privatePath="Common" />.

    Just because I'm curious I copy all of the FormatProvider DLLs out of the Common sub-folder and into the same folder as the application and now I can paste from Word and Notepad. Move them back to Common and can no longer paste.

    I've also had to move the Dictionary DLL out of the Common folder to get it to work properly.

    Is there anything that I can do to have the privatePath recognized by the Telerik DLLs so that I can store them with the rest of my Common files?

    Many thanks!
  2. Boby
    Boby avatar
    636 posts

    Posted 13 Feb 2014 Link to this post

    Hello Sandra,
    By default RadRichTextBox uses MEF to load its extensible components like format providers (needed for rich-text copy/paste) and UI widgets (dialogs etc.).

    MEF searches types as defined by the ComposablePartCatalog set to RadCompositionInitializer.Catalog, which by default is Telerik.Windows.Documents.UI.Extensibility.DependencyCatalog. Unfortunately this catalog don't support custom probing paths, which lead to the behavior you are observing.

    As a workaround, you can try to implement your own custom catalog which ensures the loading of the wanted types. The simplest possible variant is to use TypeCatalog, as described in this help article. Including only the types that you will actually need will ensure performance even better than the default one. The downside is that new types included in future versions of the RadRichTextBox (i.e. after upgrading) won't be automatically loaded. The types that you should include to enable rich text copy/paste are RtfFormatProvider and HtmlFormatProvider.

    Don't hesitate to contact us if you have other questions.


    Check out the new Telerik Platform - the only modular platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native apps. Register for the free online keynote and webinar to learn more about the Platform on Wednesday, February 12, 2014 at 11:00 a.m. ET (8:00 a.m. PT).

Back to Top