Microsoft.mshtml.dll redistribution issues

It is an interop assembly, it doesn't contain any code. Just declarations, auto-generated from the COM type library. Redistributing is thus fine. The only reason it is installed in the GAC at all is because it is a PIA, a primary interop assembly. You only need a PIA when you write a class library that exposes any of the interfaces in your own public methods. The client of such a library also needs a reference to the interop assembly to be able to use your methods and it must be the exact same one you use. This is rare in general, especially in a BHO.

If you use a Visual Studio version prior to VS2010 then just set the Copy Local property to True for the assembly reference. Rebuild and you'll get a copy of the DLL that you can deploy along with your own executables.

For VS2010 and up, you really want to favor the Embed Interop Type feature. Which embeds the interface declarations in your own assembly, only the ones you actually use. Which helps a great deal to keep the distributable size of your BHO smaller. And avoids the need to deploy that interop assembly. Strongly recommended.


  1. Mekhi

    • 2016/1/7

    It is an interop assembly, it doesn't contain any code. Just declarations, auto-generated from the COM type library. Redistributing is thus fine.

  2. Parker

    • 2021/6/6

    Microsoft.mshtml.dll redistribution issues [closed] Ask Question Asked 7 years, 11 months ago. Active 7 years, 11 months ago. Viewed 5k times 6 2. Closed. This

  3. Ledger

    • 2016/4/10

    mshtml.dll. Is it fine to add this dll with my dlls? Any legal issue ? This BHO works fine on dev environment as the Microsoft.mshtml.dll is present in visual 

  4. River

    • 2020/10/16

    The issue is that I need multiple versions of IE functionality in single project, which means I should add multiple references to Microsoft.mshtml.dll to my project and redistribute it with it. Is this a legal practice, should I buy some kind of licence from Microsoft or is this impossible to achieve in legal way? Thank you in advance.

  5. Royce

    • 2016/12/6

    mshtml.dll internally. package bho need distribute microsoft.mshtml.dll. fine add dll dlls? legal issue ? bho works fine on dev environment 

  6. Bradley

    • 2015/2/11

    Hi Jozef001, Welcome to Microsoft Answers! How long have you been experiencing this issue? Did you make any recent changes to the computer? I would suggest you to open the program in Clean Boot and check.

  7. Bardhi

    • 2015/11/8

    Can the Microsoft.Mshtml.dll file be redistributed. Thanks a lot to anyone willing to give me a hand with this sticky problem. Zukanta 

  8. Baker

    • 2016/8/12

    Microsoft.mshtml.dll redistribution issues [closed]I have made a C# BHO which is using Microsoft.mshtml.dll internally. Now to package this BHO do i need to also distribute Microsoft.mshtml.dll. Is it fine to add this dll with my dlls? Any legal issue ?

  9. Lian

    • 2017/11/2

    Hi, I've got a simple C# (.NET 1.1) app that will run only on Win2K and WinXP (min IE ver. 5.01) that uses the ax webbrowser control to display a simple

  10. Jamir

    • 2015/1/10

    I registered the microsoft.mshtml.dll in the global assembly cache. Here is the solution: Step 1: Open the Developer Command Prompt by typing dev in your windows 10 search box and right click the Developer Command Prompt for VSxxxx and run as administrator. Step 2: Navigate to your microsoft.mshtml.dll library. In my case:

  11. Andre

    • 2021/3/10

    We were able to fix the issue by downloading Office 2003 Update: Redistributable Primary Interop Assemblies and installing on the computer.

  12. Camden

    • 2021/6/16

    For Windows Embedded Standard 7, Windows Management Instrumentation (WMI) must be enabled to get updates from Windows Update or Windows Server Update Services. For Windows Thin PC, you must have the August 11, 2020 SSU ( KB4570673 ) or a later SSU installed to make sure you continue to get the extended security updates starting with the October

  13. Jimenez

    • 2020/1/6

    However there is a common problem – when redistributing the application written using Microsoft.mshtml.dll, the entire 8MB DLL…

  14. Maximilian

    • 2016/9/12

    Repair Unable to load Microsoft.mshtml.dll issue. It is worth adding that microsoft.mshtml.dll is the file used in the Visual C++ Redistributable for 

  15. Angelo

    • 2020/11/17

    What does a DLL file mean? Why are there DLL errors? DLLs (Dynamic-Link Libraries) are common libraries in Microsoft Windows, implemented by Microsoft 

Comments are closed.

Recent Posts