System.BadImageFormat Exception occured?
<p>I am getting the <code>System.BadImageFormatException</code> while automation running. Assembly generated successfully. But the problem occurred only when the assembly is verified. </p>

<p>To resolve this I have checked the <code>corflags.exe</code> is present in the installed location.    </p>

<pre><code>  System.BadImageFormatException was unhandled
  HResult=-2147024885
  Message=Could not load file or assembly 'file:///C:\Work\Demo.GeckoHtmlRenderer.Base.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format.
  Source=mscorlib
  FileName=file:///C:\Work\Demo.GeckoHtmlRenderer.Base.dll
  FusionLog=WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

  StackTrace:
       at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark&amp; stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
       at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark&amp; stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
       at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark&amp; stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
       at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark&amp; stackMark)
       at System.Reflection.Assembly.LoadFrom(String assemblyFile)
       at InstallVerifier.InstallChecker.AuthenticodeVerifier(String dll, String authenticode, String sign)
       at InstallVerifier.Program.Main(String[] args)
  InnerException:
</code></pre>
