locked
Build error after referencing MSHTML typelib RRS feed

  • Question

  • I get this error after I add reference to MSHTML COM typelib:

    Warning		Cannot find wrapper assembly for type library "MSHTML". Verify that (1) the COM component is registered correctly and (2) your target platform is the same as the bitness of the COM component. For example, if the COM component is 32-bit, your target platform must not be 64-bit.
    
    This worked in older versions of Visual Studio (2010). Does VS217 drop support for COM interop?

    Ignorance is blissful

    Tuesday, November 20, 2018 11:23 AM

Answers

  • Hi Neo,

    Welcome to the MSDN forum.

    What’s your project type and the OS version?

    Refer to the error message, it seems the Microsoft.mshtml.dll assembly in the Global Assembly Cache becomes unregistered, please have a look at this similar issue and if this Microsoft.mshtml.dll already under the GAC folder, please registere the assembly using the regasm command: regasm Microsoft.mshtml.dll.

    If not, for VS 2017, the assembly is under the folder: C:\Program Files (x86)\Microsoft Visual Studio\2017\version name\Common7\IDE\PublicAssemblies and navigate to the folder containing the assembly and run "gacutil /i Microsoft.mshtml.dll." to register it.

    Best regards,

    Sara

    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    • Marked as answer by Neo the 1 Wednesday, November 21, 2018 8:19 AM
    Wednesday, November 21, 2018 3:26 AM