Help me eliminate warning

OSVBNET 1,386 Reputation points
2022-06-20T23:57:00.397+00:00

Hello experts,
I'm using a .net html component in my Visual Basic app which relies on Microsoft.mshtml.dll and am getting this warning:

A reference was created to embedded interop assembly 'Microsoft.mshtml' because of an indirect reference to that assembly from assembly '3rdPartyHTMLSDK'. Consider changing the 'Embed Interop Types' property on either assembly.

3rdPartyHTMLSDK Embed Interop Types is set to FALSE
Microsoft.mshtml.dll Embed Interop Types is set to TRUE

If I set 3rdPartyHTMLSDK Embed Interop Types = TRUE I'll get tons of:
Reference to class 'blah' is not allowed when its assembly is linked using No-PIA mode.

If I set Microsoft.mshtml.dll Embed Interop Types = FALSE the warning is eliminated and not shown anymore!
Just was not sure if this is OK and won't cause runtime problems?
3rdPartySDK developer is out of business and can't ask them!

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,579 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. RLWA32 40,651 Reputation points
    2022-06-21T00:50:30.997+00:00

    Generally, when interop types are embedded deployment of the generated interop dll is not necessary. However, if the option is set to false then you must deploy the interop dll. I suggest you test your own deployment with and without the interop dll.