Reputation: 4566
With MEF, I compose my DLL
I work with my DLL
I recompose without this DLL
I want to delete it // => it doesn't work
How can I unload a dll in order to delete it after a MEF recomposition in which this dll is not composed ?
Upvotes: 1
Views: 1019
Reputation: 101
If you try to insert on catalog one Object Assembly like this:
Assembly assembly = Assembly.Load(System.IO.File.ReadAllBytes(Path.Combine(directoryPath, ItemPlugin)));
aggregateCatalog.Catalogs.Add(new AssemblyCatalog(assembly));
You can Delete the file later...
Upvotes: 0
Reputation: 725
Ok so how can I 'connect' an AppDomain to MEF composition ?
MEF doesnt provide infrastructure to do that, unfortunately. You'd have to bake your own.
Upvotes: 0