ESRIRegAsm stops working at ArcGIS 10.1

2318
2
07-09-2012 10:13 AM
AlanStewart
Occasional Contributor
I'm developing in C++ and am responsible for six COM DLLs. The DLLs build and register fine with ArcGIS 10.0. However, once brought over from VS 2008 / ArcGIS 10.0 to VS 2010 / ArcGIS 10.1 only some of the DLLs register with ESRIRegAsm. The ones that register successfully are the simplest ones, implementing only a menu and a toolbar. The ones that fail hang and never return a result code. Running ESRIRegAsm with the /e switch results in an echo of the command line and no further output. All these DLLs register with RegSvr32, regardless of whether ESRIRegAsm succeeds or not. If I copy the ECFG files from the ArcGIS 10.0 installation over to the ArcGIS 10.1 installation the DLLs are seen by ArcGIS 10.1 and seem to function as expected. So the flakiness seems to be with the ArcGIS 10.1 version of ESRIRegAsm.

Has anyone else seen anything like this? Does anyone have any guesses as to the cause or suggestions as to how to proceed?

Alan
0 Kudos
2 Replies
SteveXu
New Contributor III
I got similar problems, and can not find out the reason.
I migrated My customized ArcMap dlls from 9.3.1 to 10, I'm using VB.net 2010, created Setup MSIs, using ESRIRegAsm in .vbproj. Everything is working as expected.

However, when I recompiled my dlls and compiled MSIs, and installed MSIs on Windows 7 enterprise PC, The installation is successfully completed. When I open ArcMap 10.1, go custom-->Command-->Categories, I can not find the Category which my dlls should belong to. When I manually ESRIRegAsm my dlls, I can find them under My category. Do I have to use Command ESRIRegAsm to register dlls?
0 Kudos
KellyThomas
New Contributor II
^ Yes, you will have to use ESRTIRegAsm if developing for ArcGIS 10.x. 
I have been using custom actions in my Visual Studio installer projects.

ESRI Docs:
http://resources.arcgis.com/en/help/arcobjects-net/conceptualhelp/index.html#//0001000004n6000000
Sample code:
https://gist.github.com/946218
0 Kudos