title: Using external assemblies: The located assembly's manifest definition does not match the assembly reference
body: <p>I know this question seems to be answered all over stackoverflow and the web, but my issue is different.</p>
  
  <p>I am trying to understand how to not use the GAC (boss says no) when I have the following setup:</p>
  
  <p>The project uses NHibernate, and Antlr3.Stringtemplate
  Both of which are third party assemblies.
  NHibernate has a reference to Antlr3.Runtime version 3.1.3.42154
  Antlr3.Stringtemplate has a reference to Antlr3.Runtime version 3.3.1.7705</p>
  
  <p>One will error when the other is not available.</p>
  
  <p>I tried binding redirect, but this does not work because the publicKeyToken is different between the versions. It ends up looking for a 3.3.17705 with a public key token that matches the 3.1.3.42154 version.</p>
  
  <p>Installing one, or both, in the GAC works. However, my boss won't let me install anything into the GAC.</p>
  
  <p>I also tried putting both DLLs in the BIN directory, by including a Lib project with a folder for version 3.1.3.42154. 
  I told it to copy always and so I get /bin/Lib/3.1.3.42154/Antlr.Runtime.dll
  Then I added a probing element to probe that directory.
  This did not work, and I got the same exact error.</p>
  
  <p>How can you use third party assemblies that reference another third party assembly, both both reference different versions?</p>
  
  <p>UPDATE:</p>
  
  <pre><code>    System.Reflection.Assembly.LoadFile(@"Antlr3.Runtime.dll"); // 3.3.1        
      System.Reflection.Assembly.LoadFile(@"Antlr3.Runtime\Antlr3.Runtime.dll"); // 3.1.3
  </code></pre>
  
  <p>AppDomain.CurrentDomain.GetAssemblies() shows that the versions are loaded in the app domain, however, it still errors saying thta 3.1.3 cannot be found.</p>
  
  <p>The following is whats loaded from AppDomain.CurrentDomain.GetAssemblies() right before the invocation to the code that errors. The first 2 lines are whats in GetAssemblies() the third line is what the error says is missing.</p>
  
  <pre><code>{Antlr3.Runtime, Version=3.3.1.7705, Culture=neutral, PublicKeyToken=eb42632606e9261f}
  {Antlr3.Runtime, Version=3.1.3.42154, Culture=neutral, PublicKeyToken=3a9cab8f8d22bfb7}
   Antlr3.Runtime, Version=3.1.3.42154, Culture=neutral, PublicKeyToken=3a9cab8f8d22bfb7
  </code></pre>