Hi,
How can i prevent from MEF to load duplicates Modules in the case of the presence of 2 copies of the same Assembly (maybe by mistake)
Assembly1.dll
Assembly2.dll (copy of Assembly1)
[ImportMany] public IList<IModule> Modules { get; private set; } public void BuildUp() { Modules = new List<IModule>();
}var catalog = new DirectoryCatalog(@".\Modules"); var container = new CompositionContainer(catalog); container.ComposeParts(this);