title: Determine if GAC'ed & NGen'ed assemblies are being used
body: <p>How do I determine if the Native images are being used without the Loader verifing the signature of the assembly at runtime, or even using the GAC'ed assembly?</p>
  
  <p>I have complex system that we're experimenting with NGen but currently we're running the exe from the folder where all the DLL's are located due to a lot of late binding dependencies, looking at Process Explorer, it looks like the Native images are being used, but how can I be sure I'm getting the full benefit and eliminating the Loader Verification step?</p>
  
  <p>Cheers,
  Graeme.</p>
  
  <p><strong>Update:</strong>
  I'm getting lots of this sort of thing from the Assembly Binding Log viewer:</p>
  
  <pre><code>LOG: [Level 1]Start validating IL dependency MyCompany.Entities, Version=2.0.0.0, Culture=neutral, PublicKeyToken=7cd8595f4671c5dd.
  LOG: Dependency evaluation succeeded.
  </code></pre>
  
  <p>and at the end </p>
  
  <pre><code>LOG: Validation of dependencies succeeded.
  LOG: Start loading all the dependencies into load context.
  LOG: Loading of dependencies succeeded.
  LOG: Bind to native image succeeded.
  Native image has correct version information.
  Attempting to use native image C:\Windows\assembly\NativeImages_v2.0.50727_32\MyCompany.Mylibrary#\4710bb8309419d707681bd360088181f\MyCompany.MyLibrary.MyClass.ni.dll.
  ZAP: Native image has been relocated.
  Native image successfully used.
  </code></pre>
  
  <p>So it's using the Native images but still verifying them, i.e. not using the GAC version even though that's where I created the Native image from, Like so:</p>
  
  <pre><code>ngen install "MyCompany.Entites, Version=2.0.0.0, Culture=neutral, PublicKeyToken=7cd8595f4671c5dd, processorArchitecture=MSIL"
  </code></pre>
  
  <p><strong>Footnote:</strong>
  This articles seems to imply that if the assemblies are not loaded from the GAC then the verification process will offset the NGen advantages?
  <a href="http://msdn.microsoft.com/en-us/magazine/cc337892.aspx" rel="noreferrer">CLR Inside Out - Improving Application Startup Performance (MSDN)</a></p>
  
  <p><strong>Update</strong> - As Nobugz has pointed out in a comment below, the verification step mentioned above is not performed since 3.5 SP1 see:<a href="http://msdn.microsoft.com/en-us/library/6t9t5wcf.aspx" rel="noreferrer">MSDN Docs on NGen</a></p>