I've trying to write a extendable metro app using MEF. I got it working with a local extension (inside of the current assembly). Now I want to load a external dll. The DirectoryCatalog
seems to be not present in .net 4.5. So I tried to use ApplicationCatalog
but I got the following error while calling SatisfyImportsOnce
: Assembly.LoadFrom is not supported in AppX.
.
Here's me code:
var catalog = new AssemblyCatalog(GetType().GetTypeInfo().Assembly);
ApplicationCatalog catApp = new ApplicationCatalog();
AggregateCatalog cat = new AggregateCatalog(catalog, catApp);
_compositionService = cat.CreateCompositionService();
_compositionService.SatisfyImportsOnce(this);
Any suggestions what's going wrong?
I've placed the dll in the Appx directory and run VS11 Beta as administrator.