I am just getting started with MEF and hoping to integrate it with an application I'm currently working on. I am wondering if it is possible in MEF to discover parts in assemblies that are in the GAC. Essentially I would like something similar to the DirectoryCatalog but that would search the GAC. Is there anything like this out there?
Asked
Active
Viewed 557 times
3
-
Why use the GAC at all for your assemblies? just have a simple folder under your control that assemblies can be added to. – Ian Ringrose Nov 24 '10 at 17:29
1 Answers
4
I don't think there is anything like this out there. I don't think it's a good idea to do this, because it would mean loading each and every assembly in the GAC into your process.
If you want to do it anyway, the hard part is getting a list of assemblies in the GAC. After that you can just create an AssemblyCatalog for each one, and put all of the AssemblyCatalogs in a DirectoryCatalog.

Community
- 1
- 1

Daniel Plaisted
- 16,674
- 4
- 44
- 56