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
.
Note
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 toTrue
. For more information about how to set that property, see Walkthrough: Embedding Types from Managed Assemblies.To remove the warning, you can set the
Embed Interop Types
property of assembly1 toFalse
. In this case, a primary interop assembly (PIA) provides interop type information.
See also
Feedback
Submit and view feedback for