Guidance on using drop in DLLs

Posted by Scott Chamberlain on Stack Overflow See other posts from Stack Overflow or by Scott Chamberlain
Published on 2010-05-27T19:49:30Z Indexed on 2010/05/27 19:51 UTC
Read the original article Hit count: 141

Filed under:
|
|

I have been giving the task to rewrite a internal utility in .net for my work. One of program requirements the new system has is have a dll that implements a set of interfaces and have the program call the DLL.

Now this dll will be changed out a lot per deployment. My question is what is the best way to do it from a development standpoint? Do I add a template DLL (one that only has the interfaces but no implementation) to the project references like I would do any other dll that I would use.

Or do I need to use somthing like this every time I want to use code from the dll?

var DropIn = System.Reflection.Assembly.LoadFrom("DropInDll.dll");
var getActions = DropIn.GetType("Main").GetMethod("GetActions");
List<IAction> ActionList = (List<IAction>)getActions.Invoke(null, null);

© Stack Overflow or respective owner

Related posts about c#

Related posts about best-practices