My question is pretty simple, but unfortunately I haven't found an answer yet.
Using MEF , I can specify some internal export and import in the assembly of the class library as follows:
[Export] internal class SomeExport { } [ModuleExport(typeof(SomeModule))] internal class SomeModule : IModule { [ImportingConstructor] internal SomeModule(SomeExport instance) { } }
My CompositionContainer is in the main EXE assembly, but somehow it manages to instantiate the SomeExport object inside the class library assembly so that I can use it. Usually my internal class libraries should not be accessible from an EXE assembly, but somehow I create my instances.
How it works?
source share