Dynamically loading assemblies which have references

193 views Asked by At

I'm working on an application which needs to load plugins, which are usually a common interface to a proprietary assembly. The proprietary assembly also has references of its own. However, most boilerplate assembly loading code I can find (write your own plugin interface library, use Activator.CreateInstance, etc) doesn't take into account assemblies with references. For reference, here's the model of what I'm dealing with:

Application ---loads--->     FooWare library bridge plugin assembly 
                                                 |
                                                 v
                                             references
                                                 |
                                                 v
                                            FooWare assembly
                                                 |
                                                 v
                                             references
                                                 |
                                                 v
                                           Helper assembly v1.2

            ---loads---> BarWare library bridge assembly
                                        |
                                        v
                                    references
                                        |
                                        v
                                 BarWare assembly
                                        |
                                        v
                                    references
                                        |
                                        v
                                  Helper assembly v1.3

I've heard about AppDomains, but I don't really know much about them. Is there a library or something like that which will automatically do this for me, or do I have to roll my own?

0

There are 0 answers