Global Assembly Cache Query

A

Andy Janssen

Hey. I'm working on a program built to support several optional plugins. I'm
looking for a way to scan the GAC and find all objects in all assemblies
that inherit from a certain interface that each plugin must implement (by
definition). Is this possible? I would prefer to do it this way because
otherwise I have to make my own assemly registration process, which is
obviously more of a mess. I realize that the GAC strategy could take just
about forever, so I'm thinking about marking all of my plugin assemblies
with an attribute that my main program can look for while scanning the GAC.
Any ideas? I'd rather not use gacutil, but instead stay inside the
framework. (Can you even do that with gacutil?)

Thanks guys.

-Andrew Janssen
 
D

Daniel O'Connell

Why not just have a plugins folder and scan that? Relying on the GAC is a
bit risky, considering you may get 15 versions of the same assembly. Its not
designed for the concepts you have in mind.

Also, frankly, you can probably just provide an assembly with a installer
derived class that will install the plugins and do the registration, which
shifts virtually all the mess to you, end users would just need
installutil.exe(or an installer that can handle Installer based classes).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top