cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
mtdave
Level 3

Register DLLs for .NET COM Interop

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
Labels (1)
0 Kudos
(2) Replies
mtdave
Level 3

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.

Dave
0 Kudos
tglynx
Level 6

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 😄

Regards,
Michael
0 Kudos