question

osvbnet avatar image
0 Votes"
osvbnet asked RLWA32-6355 commented

Help me eliminate warning

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!

dotnet-visual-basic
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

RLWA32-6355 avatar image
0 Votes"
RLWA32-6355 answered RLWA32-6355 commented

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.

· 7
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks dude,

...if the option is set to false then you must deploy the interop dll...

You mean if I set Microsoft.mshtml.dll Embed Interop Types = FALSE I need to distribute Microsoft.mshtml.dll with my app?

0 Votes 0 ·

No, I'm talking about the generated interop dll. If you look at the property pane for your reference you should see what I'm talking about.

0 Votes 0 ·

No interop.dll in my case!

213080-untitled.png


0 Votes 0 ·
untitled.png (18.2 KiB)
Show more comments