Option 1, for me, would have to reference it in the VS project.
But if you want a more passive approach, you can use the AppDomain.CurrentDomain.AssemblyResolve event handler. It runs when an assembly is required that is not found in the AppDomain. The args events will tell you about the Assembly you are looking for, and you can grab it at that moment using Assembly.Load ()
Glenn ferrie
source share