View Full Version : Register DLLs for .NET COM Interop

01-05-2010, 12:01 PM
My installation package is for an extension to ESRI ArcGIS ArcDesktop which is a COM program. I have 3 .NET 2.0 DLLs that need to be registered with COM interop so that ArcDesktop can see them. The only way I know to do this is to register them using RegAsm.exe. I have tried it by seting the file properties in the Installation Designer to "Extract COM information" and "Scan at Build: Dependencies and Properties" with "Installer Class" and "COM Interop" but the extension does not show up in the ArcDesktop Extension Manager. If I run the RegAsm with the /tlb and /codebase switches then the extension shows up in the Extension Manager.

Is there something else I need to do to make my DLLs register correctly? Do I have to run RegAsm.exe command from a "Custom Action"?

Thanks, Dave

01-05-2010, 05:10 PM
Got this working using the following method.

1) Created a requirement that finds the .NET 2.0 Framework directory named "V2.0.50727".

2) Created a Custom EXE Action that runs RegAsm in a Command Window:

cmd.exe /c "[V2.0.50727]RegAsm.exe /tlb /codebase "[INSTALLDIR]CustExtensionNET.dll""

Now my DLLs are registering and the extension is showing up in ArcGiS Desktop Extension Manager.


02-18-2010, 05:48 AM
Hi Dave,

this is easy ;) You dont need a custom action to do this. Just right-click the assembly in files view and select properties. On the .Net / Com-Interop page select the COM-Interop Checkbox. Done :D