views:

741

answers:

3
+3  A: 

So I'm assuming that the exports are defined in external assemblies, because you use the DirectoryPartCatalog.. either there is an issue with the file path handling in the catalog or the problem is in the AttributedAssemblyPartCatalog / AttributedTypesPartCatalog

Internally the DirectoryPartCatalog wraps each discovered assembly into an AttributedAssemblyPartCatalog which in turn uses a AttributedTypesPartCatalog

Your best bet is to add the MEF project into your solution, instead of the dll, and set a break point in the greediest constructors of DirectoryPartCatalog & AttributedAssemblyPartCatalog and step until u find the problem

Unfortunatly I do not have a mono machine setup so I can't help more than that

TheCodeJunkie
A: 

Adding the interface and the two implementations to the application assembly works. So I'll have debug like you suggested, need to find a decent debugger for mono though.

TimothyP
I would start with the path you pass to the DirectoryPartCatalog - I only have a gutt feeling but it sure sounds like it could be a case of mono (perhaps on OSX) treating paths differently than NETFX on Windows.
TheCodeJunkie
+4  A: 

With the latest MEF release (Preview 4 - http://www.codeplex.com/MEF) it works just fine!

Since the bug is no longer relevant I voted to close this question.

TimothyP
Thanks for letting us know, Timothy. I've seconded your vote.
Matt Hamilton