1

I'm referencing an OCX control written in C++ targeted to native x86 code from a .NET 3.5 C# DLL. I'm getting this non-critical error message. Looking for how to get rid of it. I've searched online but the references I found so far have not been helpful.

COM Reference 'SIGPLUSLib' is the interop assembly for ActiveX control 'AxSIGPLUSLib' but was marked to be linked by the compiler with the /link flag. This COM reference will be treated as a reference and will not be linked.

I've looked through the properties for both the references SigPlusLib and AxSigPlusLib but I don't see any place where either of them has been marked to be linked with /link flag.

Links I've looked at to no avail

link1

link2

link3 This one suggested to set embed interop to false but I'm not finding that option in properties for SigPlusLib or AxSigPlusLib.enter image description here

JonN
  • 2,498
  • 5
  • 33
  • 49
  • All the web posts referencing this error reference this Embed Interop Type option that supposedly is in the properties for the reference but I don't see any such option. See right panel of image I posted above in original question. – JonN Feb 12 '20 at 04:42
  • @HansPassant OK then I don't understand something. In the image I posted the right panel is titled "Interop.SIGPLUSLib Reference Properties. I displayed it by right clicking on the InteropReference under References in Solution Explorer window and selecting "Properties". I get a similar window if I select the AxInterop.SIGPLLUSLib reference. If I go to the view menu there is a "Property Pages" menu item which is disabled and a "Property Manager" menu item which brings up an empty window saying "No Visual C++ project is loaded" Properties for what object are we talking about? – JonN Feb 12 '20 at 22:18
  • Oh, it's there. Not used to the window layout. Why the "Embed Interop Types" property is missing from that window is very hard to guess. Given how unusual the diagnostic is, I can only guess that the IDE figured out by itself that embedding wasn't possible so hid the option. Jerking the floor mat for msbuild. Use Help > Send Feedback > Report a Problem, ideally you'd supply the type library to see what is wrong with it. Any warnings you'd see when you use aximp.exe to generate the interop libraries will be highly relevant as well. – Hans Passant Feb 12 '20 at 22:34

1 Answers1

0

The mystery as to why the Embed Interop Types option was not available in the reference properties window was apparently due to building the DLL with such an old version (3.5) of .NET. I upgraded the C# DLL to use .NET 4.7.2 and the Embed Interop Types option was available and showed that in SigPlusLib the option was set to TRUE. Once I set it to FALSE the error message went away. The interop wrappers were auto generated when I added the control to my Form and the 2nd one "SigPlusLib" had the Embed option set by default when it was auto-generated by Visual Studio.

JonN
  • 2,498
  • 5
  • 33
  • 49
  • My project keeps throwing same warning for COM reference WMPLib for Windows Media Player control AxWMPLib. I am already using .NET Framework 4.7.2 and Embed Interop types is already set to false – Matias Masso Mar 21 '22 at 19:19