1

System.BadImageFormatExceptionオートメーションの実行中に取得しています。アセンブリが正常に生成されました。しかし、問題はアセンブリが検証されたときにのみ発生しました。

これを解決するためcorflags.exeに、がインストールされた場所に存在することを確認しました。

  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& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
       at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
       at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& 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& 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:
4

0 に答える 0