[GIS] ArcMap AddIn Build Error when referencing external ActiveX Interface in VS2010

add-inarcmaparcobjectsvisual studio

If the "Register for COM interop" is unchecked the projects builds without errors.

VS2010 Project Properties Build Tab

But I have to reference external ActiveX Interface in my project so I have to have that check-box checked. I am getting the build error:

Cannot register assembly "…\MyCustomArcMapAddIn.dll". Could not load file or assembly 'ESRI.ArcGIS.Desktop.AddIns, Version=10.1.0.0, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86' or one of its dependencies. The system cannot find the file specified.

Is there workaround here?
Thanks

Best Answer

The newer type of ArcGIS Add-in's do not get registered for COM interop. However, You can use ActiveX controls in an Add-in without using this option. The controls should be installed separately before the Add-in. For example, you can use Microsoft ReportViewer with an add-in if it is installed on the machine already.

Related Question