

Note: if you take a look at the list when you add a. Then, copy the dll () to the target machine, run the following command to install it to the GAC. If you’re using Visual Studio 2005+, you could find the assembly from %Program Files%\Microsoft.NET\Primary Interop Assemblies. After that, the COM Interop assemblies will be installed and registered.Ģ. Extract the files from the downloaded exe, and run the *.msi (e.g., o2007pia.msi) to installed it. Use the links below for Office 20 respectively.
How To Install Microsoft.Mshtml Assembly download#
Download the Primary Interop Assemblies redistribution packages for Office system from Microsoft. That directly or indirectly depends on it could work as expected.ġ. The following shows two ways to simply deploy the mshtml so that your application NET applications call mshtml via COM Interop service, so that we need the COM Interop assemblies installed property. Mshtml.dll exposes its functionalities via COM interfaces, and generally you could locate the COM server and type library at %systemroot%\system32\mshtml.dll/tlb. In other cases, you could deploy the mshtml manually. ) Basically, if your operating system has installed all the updates, basically it works. (For us, it worked well in our pre-production environment, however did work in the production environment. However, mshtml might not be installed properly in some environment.

One of the component we have recently delivered depends upon the mshtml a little bit.

To enable it going in to the user's machine, you can just mark the Publish Status of the dll to "Include (Auto)". it does not get downloaded to the user's machine. The solution was to push in to the bin directory.īy default if you go to Project Properties -> Publish -> Application Files you will see something like :Ĭlickonce correctly identifies as a prerequisite but has marked "None" as the dowload group i.e. Any application looks for dlls in GAC only after it has looked in to the current directory. NET Framework SDK by setting it as Prerequisite in ClickOnce (under Publish -> PreRequisite) solved the issue but it does not make much sense to ask users to download a 350+ MB package and install it just to get a dll. Now that I found the problem, I had to find a solution. NET Framework SDK dont have it in there GAC hence the error. People who have not installed Visual Studio or. As I have Visual Studion installed in my workstation, the Microsoft.mshtml had got added to my GAC and the appliaction worked fine on my workstation. As it turned out, the PIA's refer to this dll internally. I was surprise at first as I was not at all using Microsoft.mshtml in my application. When a user tried to install it, he got an error : I had recently published an application using ClickOnce which used MS Office Primary Interop Assemblies.
