HtmlEditor :  Phorum 5 The fastest message board... ever.

This is the discussion forum for the HtmlEditor. See also the HtmlEditor home page, where you can download the control, and the Documentation Wiki, a collaborative project for documenting the control.

Goto Thread: PreviousNext
Goto: Forum ListMessage ListNew TopicSearchLog In
Proper way to install Microsoft.mshtml.dll
Posted by: George Soules (---.greenmountainaccess.net)
Date: Monday, 24-Jan-2005, 22:19:09

We are trying to determine the best/correct way to include Microsoft.mshtml.dll with our app that uses HtmlEditor.

The simple approach is to simply copy the dll to our application directory. However, if the user already has a copy on their machine, we will be giving them another.

A better approach would be to check the Global Assembly Cache to see if the dll is already installed, and if it is, use the installed version. A risk there is that if the user uninstalls the dll, our app will no longer work.

If we don't find the dll on the user's machine, we could use gacutil and regasm to install it, but where should we copy the 8MB dll file to?

Given that Microsoft.mshtml.dll is a Microsoft product, there ought to be some guidelines for dealing with it, but we have not yet discovered them.

Has anyone had to deal with this and/or know how it should be done?

George


Re: Proper way to install Microsoft.mshtml.dll
Posted by: Tim (---.gotadsl.co.uk)
Date: Monday, 24-Jan-2005, 23:25:34

George,

First, your setup should check for IE 6.0 and offer to install it if not present. This will upgrade the unmanaged mshtml components. IE 5.5 is meant to be sufficient, but I feel safer with IE 6.0.

As for mshtml, here are two sensible options. You can stick in the GAC; if you do, you are meant to use the Windows Installer. A VS.NET setup project works fine. You are not meant to use gacutil for deployment. Regasm isn't necessary for Microsoft.mshtml.dll; in fact, I'd have thought it might mess things up.

The other idea is to copy it to the application folder. As you say, you could avoid this if it is already in the GAC. I doubt it would do any harm though.

Not sure what the official position is, but I noticed that Microsoft say the Office XP PIAs should be installed in the GAC; I guess the same might apply to mshtml.

Tim

Re: Proper way to install Microsoft.mshtml.dll
Posted by: George Soules (---.greenmountainaccess.net)
Date: Tuesday, 25-Jan-2005, 14:33:22

Tim,

Thanks for the advice. It had not occurred to me that there were IE dependencies as well. If we go the simple route of simply copying Microsoft.mshtml.dll to our application folder and ignoring the GAC altogether, do we still need to check that IE 6 is installed?

George


Re: Proper way to install Microsoft.mshtml.dll
Posted by: Tim (---.gotadsl.co.uk)
Date: Tuesday, 25-Jan-2005, 14:48:03

George,

Yes, because the managed assembly is a wrapper for mshtml itself, which is part of IE. MSDN has some code for checking the IE version. You could simply advise users to upgrade, rather than supplying the IE setup yourself.

Tim

Re: Proper way to install Microsoft.mshtml.dll
Posted by: James Hancock (209.112.24.---)
Date: Friday, 28-Jan-2005, 14:42:47

Always always in this day and age install EVERYTHING into your application directory and NEVER into the GAC.

Why?

Because people have huge hard drives and it doesn't matter any more, and DLL sucks.

Because upgrading a file in the GAC programmatically afterwards with an update utililty is problmatic at best.

Because if you put it in your application directory debugging becomes easy. Something not working? Great copy over the entire directory from another computer that's working and you're done.

Etc. etc. etc.

My personal opinion is that the GAC should be for MS .NET Framework related stuff only.

Re: Proper way to install Microsoft.mshtml.dll
Posted by: James Hancock (---.amtelecom.net)
Date: Wednesday, 09-Feb-2005, 22:26:55

Clarification:

DLL Sucks = DLL Hell Sucks

"for ms.net framework related stuff only" = "only stuff from MS that is isntalled by the .net framework installer"

Re: Proper way to install Microsoft.mshtml.dll
Posted by: Lior Ben Dror (---.inter.net.il)
Date: Friday, 22-Apr-2005, 20:35:30

James,

I wouldn't disregard Microsoft's recommendation about installing PIAs in the GAC:

I have a .NET application which is using the Microsoft.mshtml PIA. It frequently experienced exceptions with a message saying that the Microsoft.mshtml assembly or one of its dependencies is missing. Weirdly enough, this happens on some machines, but works fine on others! (actually, it works fine on the majority of machines)

This problem was solved once I installed the mshtml PIA in the GAC.

Hope this helps,

Lior

Re: Proper way to install Microsoft.mshtml.dll
Posted by: James Hancock (216.191.83.---)
Date: Sunday, 01-May-2005, 23:08:55

If you install into the application's own directory you will never get these errors because it's the first place that the app looks. It also ignores all other versions including those in the GAC thus ensuring that you always have the right version.

MS is still stuck in Windows 3.1 days in their minds. Lots of people at MS are finally figuring this out and pushing MS to change the recomendations. (I've talked to them directly, and ClickOnce is phase one of this)

Re: Proper way to install Microsoft.mshtml.dll
Posted by: poonguzhali (---.del.tulipconnect.com)
Date: Wednesday, 29-Sep-2010, 09:08:46

send me the proper way to install mshtml.dll



Your Name: 
Your Email: 
Subject: 
Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically.
b7KVT
This is a moderated forum. Your message will remain hidden until it has been approved by a moderator or administrator
This forum powered by Phorum.