Could not Load Type mshtml.HTMLDocument - Error

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a Windows Forms application developed in .NET Framework 1.1 which has
a Microsoft Web browser embedded in a Form and is using mshtml to do some
changes on the loaded html file.

One of the user gets the following error while running that form.

"Could not load type mshtml.HTMLDocument from assembly, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null"

I have copied the Microsoft.mshtml.dll file into the application folder and
it has the Version number 7.0.3300.0.

The user is running on Windows 2000 SP4 and has IE version 6.0.2800.1106.

Is there something else that needs to be registered or copied?
 
Never mind. The user had a wrong version registered in the GAC. Here is the
statement from msdn

"The common language runtime always directs your application to the primary
interop assembly in the global assembly cache when both the global assembly
and your local assembly have the same vendor signature."

Here is the link that gave me that info.
http://msdn.microsoft.com/library/d...conredistributingprimaryinteropassemblies.asp

Even though I had it in the local application folder it went looking for it
in the GAC. Normally for other .NET dlls it usually looks into the local
folder first and then the GAC. Looks like it is different for the PIA's. Not
sure why though.
 
Back
Top