All,
I have been developing in VS2005 (C# .NET 2.0) for some time now. We
use the Microsoft MSHTML control, so my application binds to version
7.0.3300.0 of Microsoft.mshtml.dll (the default MSHTML dll in VS2005).
This is a problem, it seems, because on a machine that does not install
VS2005 but has .NET 2.0, the version is 6.x. So, my application cannot
run any browser control code.
The easy solution is to distribute the 7.0.3300.0 version of
Microsoft.mshtml.dll in the binary directory of my application.
Unfortunately, I understand that this type of distribution is illegal.
I certainly do not want to require my users to upgrade to IE 7.
I have heard people say that I should distribute interop.mshtml.dll.
What is this about? Is THIS method legal? I suppose that I could bind
to the version of the DLL that ships with SP2, and require at least
SP2, but I am not crazy about that either.
Any insight is appreciated.
Thanks,
B
Günter Prossliner - 25 Oct 2006 17:43 GMT
Hi!
> I have heard people say that I should distribute interop.mshtml.dll.
> What is this about?
You should not create your own "interop.mshtml.dll", because a PIA exists
(C:\Program Files\Microsoft.NET\Primary Interop
Assemblies\Microsoft.mshtml.dll). Do NOT reference mshtml.dll, reference the
PIA (Microsoft.mshtml.dll).
But even if there would be no PIA. The interop Assembly contains only
metadata needed for .Net to call COMponents. The "real" COM-Server (dll)
must exists an be registred on the system. The interop-dll doen't replace
the original dll.
Try to use the PIA. This may solve your versioning-problems.
OK?
GP
Bilz - 25 Oct 2006 18:18 GMT
> You should not create your own "interop.mshtml.dll", because a PIA exists
> (C:\Program Files\Microsoft.NET\Primary Interop
[quoted text clipped - 10 lines]
> OK?
> GP
This is what we are using. I was under the understanding that it was
illegal to re-distribute Microsoft.mshtml.dll. You are saying this is
not the case (I hope you are correct). Can you cite something from
Microsoft that explains this?
Thanks,
B
SvenC - 26 Oct 2006 09:03 GMT
Hi Bilz,
> All,
>
[quoted text clipped - 4 lines]
> VS2005 but has .NET 2.0, the version is 6.x. So, my application cannot
> run any browser control code.
What is the error you get, when only version 6.x of mshtml.dll is available?
Maybe this can be overcome with some config file.
--
SvenC
> The easy solution is to distribute the 7.0.3300.0 version of
> Microsoft.mshtml.dll in the binary directory of my application.
[quoted text clipped - 9 lines]
> Thanks,
> B