Export (0) Print
Expand All
Expand Minimize

Compiler Warning (level 1) CS1762

A reference was created to embedded interop assembly '<assembly1>' because of an indirect reference to that assembly from assembly '<assembly2>'. Consider changing the 'Embed Interop Types' property on either assembly.

You have added a reference to an assembly (assembly1) that has the Embed Interop Types property set to True. This instructs the compiler to embed interop type information from that assembly. However, the compiler cannot embed interop type information from that assembly because another assembly that you have referenced (assembly2) also references that assembly (assembly1) and has the Embed Interop Types property set to False.

NoteNote

Setting the Embed Interop Types property on an assembly reference to True is equivalent to referencing the assembly by using the /link option for the command-line compiler.

To address this warning

  • To embed interop type information for both assemblies, set the Embed Interop Types property on all references to assembly1 to True.

  • To remove the warning, you can set the Embed Interop Types property of assembly1 to False. In this case, interop type information is provided by a primary interop assembly (PIA).

Community Additions

ADD
Show:
© 2014 Microsoft