C# .NET - How to install Microsoft.mshtml.dll in GAC

Asked By svt gdwl on 05-Jun-09 04:26 AM
This is the error I was getting while installing a in-process dll (BHO) setup which is made in Vs2005 using c#
"could not load file or assembly 'Microsoft.mshtml, version=7.0.3300.0,Culture=neutral,PublicKey=b03f5f7f11d50a3a' or one of its dependencies. The System cannot find the file specified."

For this, I googled and found that Microsoft.mshtml should be installed in GAC or should be available in IE installation folder.
I tried the second one, but still the dll doesnot gets injected?
Anyone can suggest something to solve this?
Santhosh N replied to svt gdwl on 05-Jun-09 04:40 AM

On first note, its not required to have the dll in GAC eventhough the error message says it all...

You could check here for the laternatives which might suit you in installing it successfully..

http://social.msdn.microsoft.com/forums/en-US/winformssetup/thread/fa07ed63-68d5-45b4-bbe8-c2339c4f7136/

re - Ravenet Rasaiyah replied to svt gdwl on 05-Jun-09 05:30 AM

Hi

Here alternative way access the Microsoft.mshtml dll in BHO

http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/Q_23204601.html

thank you
Harry L replied to svt gdwl on 05-Jun-09 06:26 AM

You dont need to deploy mshtml dll in GAC.

To do so you can goto reference, select the dll and click on properties. Change the local copy poerprty to true.

or else

Chang the files Microsoft.mshtml.dll from "Prerequisite" to "Include" and republish the project.