I have a dotnetcore dll 2.1 which is supposed to load another dotnetcore dlls plugins using MEF , i have in code :
ImportMany(typeof(PluginCreatorEnvironment))
catalog.Catalogs.Add(new DirectoryCatalog(dll plugin path))
var container = new CompositionContainer(catalog);
container.SatisfyImportsOnce(this);
I check the catalog , it loads in its loaded assemblies the right one , but importing doesn't happen to my this object.
I try same every thing with plugin in .net framework 4.6.1 , it is loaded and imported correctly , i have no compile error or even exception in debugger , just no imported attributes !
I use windows 10 , VS 2017 , .net core 2.1.3 .
Originally i am trying to migrate to all dotnetcore , but as i use MEF with many plugins , i face now these problems .
I want to maintain using MEF using plugins loading , so i don't want to change the MEF code to directly refrence library.
@maAfify commented on Thu Sep 06 2018
I have a dotnetcore dll 2.1 which is supposed to load another dotnetcore dlls plugins using MEF , i have in code :
I check the catalog , it loads in its loaded assemblies the right one , but importing doesn't happen to my this object.
I try same every thing with plugin in .net framework 4.6.1 , it is loaded and imported correctly , i have no compile error or even exception in debugger , just no imported attributes !
I use windows 10 , VS 2017 , .net core 2.1.3 .
Originally i am trying to migrate to all dotnetcore , but as i use MEF with many plugins , i face now these problems . I want to maintain using MEF using plugins loading , so i don't want to change the MEF code to directly refrence library.