Share via


Error recording VS 2010 tests

I recently helped a customer resolve an issue where they kept receiving the following error every time they went to record a test using VS 2010:

“Unable to cast COM object of type ‘mshtml.HTMLInputElementClass’ to interface type ‘mshtml.IHTMLElement’.  This operation failed because the QueryInterface call on the COM component for the interface with IID ‘{3050F1FF-98B5-11CF-BB82-00AA00BDCE0B}’ failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).”
 

Apparently, the user had installed a third party tool and it installed some assemblies into the GAC which were older versions that what was expected.  The workaround was to find the latest version of the microsoft.mshtml.dll and install it into the GAC with the following command:

Gacutil /i  microsoft.mshtml.dll /f

This was done from the user's C:\Program Files\Microsoft.NET\Primary Interop Assemblies directory.  Once the user ran this command, he was able to record tests again.

Comments

  • Anonymous
    July 28, 2011
    Hi Paul, I get the same error and even after installing the correct version to GAC i still get the same error. Any ideas on this ?? Regards, Rajee

  • Anonymous
    July 28, 2011
    Hi Rajee, What do you see when you run Gacutil /l microsoft.mshtml.dll? Paul