Hi,
I have assembly loaded by mef. it contains class with custom typedescriptor.
If the assembly is in the same folder as executing assembly, custom typedescriptor is loaded, but if I move it to my "Modules" folder, the typedescriptor won't initialize.
[TypeDescriptionProvider(typeof(MyTypeDescriptionProvider))]
public class CustomClass
{
}
//load mefmodule
var container = new CompositionContainer(new AssemblyCatalog("Modules/CustomObjectModule.dll"));
ICustomClassModule module = container.GetExportedValue<ICustomClassModule>();
var customClassInstance = module.GetCustomClassInstance();
// TypeDescriptor.GetProperties(customClassInstance).Count == 0
When I copy and paste CustomObjectModule.dll to executing assembly folder TypeDescriptor.GetProperties works properly and return 3 properties.
I provided a sample project that demonstrates the problem:
https://skydrive.live.com/redir?resid=51A46BBA4E9EF07E!1181
Is there any workaround?