Newbie problem importing

Oct 9, 2009 at 12:28 PM

Hi,

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();

batch.AddPart(this);

container.Compose(batch);

Any help much appreciated, Mark

 

Developer
Oct 9, 2009 at 9:56 PM

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