Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot reference MSHTML properly

I need a small help building an old .NET project with VS2017 under Windows 10 (latest build).

My problem is the "MSHTML" component which I need to reference somehow. Doing so via References - Add - COM - Microsoft HTML Object Library results in the following build error:

warning MSB3283: 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.

The same error occurs when I try to reference C:\Windows\system32\mshtml.tlb directly.

There only solution for this I've found (e.g., http://techninotes.blogspot.ru/2016/08/fixing-cannot-find-wrapper-assembly-for.html) assumes that mshtml is already in the GAC which is not my case: I found nothing alike in GAC, GAC_32 and GAC_64 folders.

Is there anything else to try? Thank you in advance.

like image 755
Alex Kiselev Avatar asked Nov 08 '22 12:11

Alex Kiselev


1 Answers

I have a similar situation, only is Windows 8.1.

But the trouble is in the other, the plugin itself which works on another computer not running on the computer where you can't build the project. Perhaps the problem in the operating system.

like image 186
Macro Avatar answered Nov 13 '22 00:11

Macro