title: External component has thrown an exception from third party assembly
body: <p>We use a 3rd party mixed mode assembly that interfaces with a printer device.</p>
  
  <p>In one of our applications, the assembly functions correctly.</p>
  
  <p>In another application, it was generating the following exception:</p>
  
  <pre><code>Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.
  </code></pre>
  
  <p>After doing some research, I discovered that I could add the following to the app.config file to resolve this problem:</p>
  
  <pre><code>&lt;startup useLegacyV2RuntimeActivationPolicy="true"&gt;
  </code></pre>
  
  <p>(The application that works already had this setting in its app.config)</p>
  
  <p>Although this did resolve the "Mixed mode assembly" issue, now I'm seeing a somewhat different problem:</p>
  
  <pre><code>External component has thrown an exception
  </code></pre>
  
  <p>The strange thing is that I have one application which works correctly and another application which does not.  They both call the third party assembly via the same code (which is another one of our assemblies).</p>
  
  <p>I tried creating a very simple test app which calls the third party assembly using the same code path, and it also fails with the "External component has thrown an exception" error.</p>
  
  <p>I've compared the app.config files for all of the applications and they are essentially the same, and I've double checked that all of the build settings are the same for each.  Both projects target .NET 4.0 and X86.</p>
  
  <p>There is obviously something different about the two applications but I'm at a loss to identify what it is.</p>
  
  <p>Development environment is Visual Studio 2010.</p>
  
  <p>Does anyone have any suggestions on what other areas I could investigate?</p>