Guidance on using drop in DLLs
- by Scott Chamberlain
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);