class from assembly file on networks share is invisible to container.GetExportedValues<T>

Apr 23, 2011 at 12:18 AM

I have some code that enumerate exported class by name: 

var container = new CompositionContainer(new DirectoryCatalog(folderPath, "*tasks.dll")); 

foreach (var exportClass in container.GetExportedValues<TaskBase>())

 

{
Logger.LogInfo("current exportClass name:[{0}]", exportClass.GetType().Name);

 }

 

this code works fine when the folder is local like: [folderPath]=c:\abc\

When the same set of dlls are put in UNC path like \\machinename\sharename\ 

The code shows nothing.

Is there a way to enable MEF to see exported classes from assembly on network share?



Thanks

haicheng@microsoft.com