title: How to choose a specific version of a DLL at runtime
body: <p>This is a follow-up to a previous question <a href="https://stackoverflow.com/questions/29938768/is-it-possible-to-switch-dlls-at-runtime-so-as-to-use-a-different-version">Is it possible to switch DLLs at runtime so as to use a different version?</a>.</p>
  
  <p>Since posting that question I have reorganised my project but am still have DLL loading problems.</p>
  
  <p>I have 3 main projects: the application, a library containing MEF plugins and a second library containing more MEF plugins. Each plugin handles a type of IO device.</p>
  
  <p>The manufacturer of one of the devices has produced a new set of identically named but incompatible DLLs. I now have 2 plugins to handle each version and put them in 2 separate projects (MEF Lib1 &amp; MEF Lib2).</p>
  
  <p>The MEF loader decides which one of the conflicting plugins to load (only one is needed) and the plugin is told to initialise itself. It then copies its' DLLs (managed and unmanaged) to the execution folder before the DLLs are accessed.</p>
  
  <p>This does not work as desired. The <strong>managed</strong> DLLs are correct but the <strong>unmanaged</strong> DLL that actually gets loaded is an older version.</p>
  
  <p>I have tried using the <code>AppDomain.AssemblyResolve</code> event but this only seems to be activated when a DLL cannot be found. In my case, the DLL is always found - just not the one I want.</p>
  
  <p>What am I doing wrong?</p>