1

I have a Silverlight application using MEF to load UserControl plugins into the main shell. Each plugin has a metadata in which described are the name, version, icon and something like these of the plugin and I use [ImportMany] attribute to import them all into the main shell. When I click one plugin on the navigation bar, the view placeholder navigates to the corresponding plugin. I find it weird that it should throw such an exception on navigation. And if I remove the [Export] attribute in the plugins, everything works fine.

The invoker threw an exception. And here's the traceback:

in System.Windows.Navigation.PageResourceContentLoader.EndLoad(IAsyncResult asyncResult)
in System.Windows.Navigation.NavigationService.ContentLoader_BeginLoad_Callback(IAsyncResult result)
in System.Windows.Navigation.PageResourceContentLoader.BeginLoad_OnUIThread(AsyncCallback userCallback, PageResourceContentLoaderAsyncResult result)
in System.Windows.Navigation.PageResourceContentLoader.<>c__DisplayClass4.<BeginLoad>b__0(Object args)

I searched a lot and many said it was something (a classic problem) to do with caching and reparenting, though I still cannot figure it out the cases described in some articles are not the same with mine.

Anybody got an idea about what is going on?

Isilmë O.
  • 1,668
  • 3
  • 23
  • 35

0 Answers0