views:

68

answers:

0

Hi,

I'm using .NET 4, trying to add a reference to mshtml, and I want to have all the capabilities depending on the version the client has installed.

If I add a reference to the COM component called 'Microsoft HTML Object Library', the reference is labelled "MSHTML" and the path points to an assembly in the GAC called 'Microsoft.html' for some reason. Even though I have IE8 installed, it is still missing the IE8 interfaces, which makes me think it is just pointing to the Microsoft.html.dll wrapper instead of generating the reference from the actual COM compoment. The Microsoft.html.dll wrapper is missing the IE8 interfaces, and from what I can tell, this wrapper is somewhat unnecessary with the .NET 4 "Embed Interop Types" feature.

The other thing that scares me is the "Specific Version" field on the reference, which is set to true, and I can't change it. What if someone has a lower version of "Microsoft HTML Object Library" than my dev machine?

Thanks,

--Mike

EDIT: Sorry, got a little confused between adding a reference to Microsoft.mshtml .NET assembly and directly to the COM component. If I add the reference to the COM component, "Specific Version" isn't available in the properties, but it shows "Strong Name: True" and "Version: 4.0.0.0". Will this work regardless of the IE version installed on the client machine?