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

Cannot Find DLLs in Referenced Sub-Directory

1 Answer 87 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Sandra
Top achievements
Rank 1
Sandra asked on 10 Feb 2014, 07:10 PM
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 http://www.telerik.com/help/wpf/radrichtextbox-features-clipboard-support.html 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!

1 Answer, 1 is accepted

Sort by
0
Boby
Telerik team
answered on 13 Feb 2014, 11:12 AM
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.


Regards,
Boby
Telerik

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).

Tags
General Discussions
Asked by
Sandra
Top achievements
Rank 1
Answers by
Boby
Telerik team
Share this question
or