1

I’ve a strange problem in my app. I’m using MEF to load Exports from some Dll’s. Which works on my computer and on the most others too. But on some machines the composing won’t work… MEF starts the composing but it never ends and MEF doesn’t throw an exception.

My code:

var catalog = new AggregateCatalog(new DirectoryCatalog( "Plugins" ), new     
    AssemblyCatalog(Assembly.GetExecutingAssembly()));

var container = new CompositionContainer(catalog);
container.ComposeParts(this);//problem right here <-
musium
  • 2,942
  • 3
  • 34
  • 67
  • 1
    why you think it never ends? If it stuck in some method call - wait few seconds and press Pause in debugger then see callstack – sll Mar 22 '13 at 09:39
  • i cant reproduce it in the debugger, I’ve used the console to print the current status of the application and I can see that it reaches the container.ComposeParts(this); – musium Mar 22 '13 at 09:55
  • Are you deploying the same files in the same directory structure on all machines? – Panos Rontogiannis Mar 23 '13 at 11:24
  • You can [enable MEF traces](http://blogs.msdn.com/b/dsplaisted/archive/2010/07/13/how-to-debug-and-diagnose-mef-failures.aspx) by configuring them in application's config file to listen to `System.ComponentModel.Composition` source and see a lot of debug information which might contains information about issues. Also, is it web site? Are there any subfolders under `\Plugins`? – sll Mar 28 '13 at 14:07

0 Answers0