Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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.
Error ID: BC40059
To address this warning
To embed interop type information for both assemblies, set the
Embed Interop Typesproperty on all references to assembly1 toTrue.To remove the warning, you can set the
Embed Interop Typesproperty of assembly1 toFalse. In this case, interop type information is provided by a primary interop assembly (PIA).