This project has moved. For the latest updates, please go here.

Newbie problem importing

Oct 9, 2009 at 11:28 AM


Having just downloaded the latest release of MEF i'm not having problems which weren't there with a previous release I was using, can anyone tell me whats wrong with the following:


ImportMany(AllowRecomposition = true)]

private static IEnumerable<IPlugin> _myPlugins { get; set; }

and then the following is no longer picking up any of my Plugins (this was working perfectly fine until I updated to the latest release):

catalog =

new DirectoryCatalog(this.Path, this.Extension);

container = new CompositionContainer(catalog);

batch = new CompositionBatch();



Any help much appreciated, Mark


Oct 9, 2009 at 8:56 PM

Static imports are not supported and will not even be discovered. Change _myPlugins to be non-static.