BadImageFormatException with Microsoft.mshtml



Hello,

I have written an application in .NET (C#) which uses some stuff from the
Microsoft.mshtml. Unfortunately some customers reported that they are
missing this DLL. Therefore we now redistribute a copy of the
Microsoft.mshtml-DLL with our installation routine (just copy it into the
application directory). Now the application works on most machines, but on a
couple of machines I get a "BadImageFormatException" (details below).

What could be the reason for this exception? How can I fix it and ensure
that my application can load the DLL? Could it be a version conflict or
policy problem?

Thanks in advance!
Erich

------

System.BadImageFormatException: The format of the file 'Microsoft.mshtml' is
invalid. File name: "Microsoft.mshtml" at [...]

=== Pre-bind state information ===
LOG: DisplayName = Microsoft.mshtml, Version=7.0.3300.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a (Fully-specified)
LOG: Appbase = C:\MyApp\
LOG: Initial PrivatePath = NULL
Callong assembly: MyApp, Version=1.0.1942.28310, Culture=neutral,
PublicKeyToken=null.
===

LOG: Publisher policy file is not found.
LOG: Host configuration file not found.
LOG: Using machine configuration file from
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\config\machine.config.
LOG: Post-policy reference: Microsoft.mshtml, Version=7.0.3300.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
LOG: Attempting download of new URL file:///C:/MyApp/Microsoft.mshtml.DLL.


.



Relevant Pages

  • BadImageFormatException with Microsoft.mshtml
    ... couple of machines I get a "BadImageFormatException". ... that my application can load the DLL? ... Publisher policy file is not found. ... Host configuration file not found. ...
    (microsoft.public.dotnet.general)
  • BadImageFormatException with Microsoft.mshtml
    ... couple of machines I get a "BadImageFormatException". ... that my application can load the DLL? ... Publisher policy file is not found. ... Host configuration file not found. ...
    (microsoft.public.dotnet.general)
  • Re: GAC entries dont show up in References/.NET
    ... cannot be called by another dll. ... Download the files from here http://www.geocities.com/abubakar021/help.zip. ... ClassLibrary1, ... Application configuration file does not exist. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: GAC entries dont show up in References/.NET
    ... cannot be called by another dll. ... Download the files from here http://www.geocities.com/abubakar021/help.zip. ... ClassLibrary1, ... Application configuration file does not exist. ...
    (microsoft.public.dotnet.general)
  • Re: regsvr32 error code 0x80004002
    ... configuration file. ... Regarding DLL hell, I want to talk it from another perspective. ... Per-application Configuration on Windows XP ... To have it work, you must install Application ...
    (microsoft.public.vc.mfc)

Loading