I've got a problem with MEF and a console application I'm writing... I've got a dll that uses IoC to access data for generating report, this class is used within a WPF project (it used cocktail and ideablade for accessing data) and everything works fine...
now I've been asked to write a batch generator for some reports but I got a nullreference exception each time I use IoC.Get<>()
here's my Composition() in program.cs
var catalog = new AggregateCatalog();
var container = new CompositionContainer(catalog);
var a = IoC.Get<IApplicationRepository>(); //this crashes..
what am I doing wrong? in the container.Catalog there's the export for the IApplicationRepository..