title: Referencing an external .NET DLL provided by another application in C#
body: <p>I have a C# project which references a DLL (call it external DLL) which comes with another application. When I build my project, due to the reference, the external DLL gets automatically added to my project output. And when I run my project it loads the external DLL from my project folder.</p>
  
  <p>The other application, which the external DLL belongs to, is developed by another team and the DLL is regularly updated. I don't want to package their DLL with my project. Instead I would like to have my project load their DLL when executed -- rather than pick the DLL copy from my project's folder.</p>
  
  <p>Now I know that this is possible through reflection. I know that I can do an "Assembly.Load" and pick the DLL. But because I use the types from the external DLL all through my code, I would like the code to be statically type checked.</p>
  
  <p>Here's what I would like:</p>
  
  <ol>
  <li>Be able to compile my project by referencing the external DLL and thus get static type checking.</li>
  <li>When the project is run, the external DLL is picked up from the other application's folder and not the copy of the DLL which is in my project's output folder.</li>
  </ol>
  
  <p>Is there any way to solve this problem? Is there some middle ground between adding a reference and using reflection? </p>