Search code examples
c#.netcomvisual-studio-2019ocx

COM Reference 'XyzLib' is the interop assembly for ActiveX control 'AxXyzLib' but was marked to be linked by the compiler with the /link flag


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


Solution

  • 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.