title: Assembly.GetTypes() - ReflectionTypeLoadException
body: <p>We implement a plugin framework for our application and load plugin assemblies using Assembly.Loadfrom. We then use GetTypes() and further examine the types with each plugin file for supported Interfaces.</p>
  
  <p>A path for the plugins is provided by the user and we cycle through each of the files in the folder to see if it (the plugin) supports our plugin interface. If it does, we create an instance, if not we move onto the next file.</p>
  
  <p>We build two versions of software from the one code base (appA_1 and appA_2).</p>
  
  <p>Loading the plugins works well when the plugins are loaded by the application that was built at the same time as the plugin file. However if we build appA_2 and point to the plugin folder of appA_1, we get an exception when GetTypes() is called.</p>
  
  <p>A basic version of our code is;</p>
  
  <pre><code>var pluginAssembly = Assembly.LoadFrom(FileName);    
  foreach (var pluginType in pluginAssembly.GetTypes())
  {
  </code></pre>
  
  <p>We get a "ReflectionTypeLoadException" exception.</p>
  
  <p>This is concerning because we want our application to be able to load the types of any plugin, built by anyone. Is there something we are missing?</p>
  
  <p>EDIT: 
  After iterating through the LoaderExceptions we have discovered that there is a single file libPublic.dll that generates a System.IO.FileNotFoundException exception. The strange thing is that this file resides in the application directory and the plugin is referenced to the project file.</p>
  
  <p>EDIT 2:
  In the exception log we find the following
  "Comparing the assembly name resulted in the mismatch: Revision Number"</p>