Select to view content in your preferred language

Register extension fails..

3146
7
11-03-2009 06:57 AM
ErikNyberg
Deactivated User
I have upgraded a project (ArcMap Extension) from 9.3 to 9.4 but I can't register it with ArcMap.

I have tried to add the xml code in the solution file but also tried to register it with the ESRIRegAsm.exe. They both throws an error message:

In Visual Studio:
The command "esriRegasm.exe 'C:\ProjectName\bin\Debug\product.dll' /v 9.4 /p Desktop /s" exited with code -1.


When running it from cmd:
Registration failed. Exception has been thrown by the target of an invocation.

Is there anywhere I can see more information on why it is failing?
0 Kudos
7 Replies
RalfGottschalk
Esri Contributor
Based on your description, I believe you are trying to follow the migration document here?

There is a bug with our documentation at this time that should be resolved soon.  The xml does not come over correctly and you probably have the wrong syntax set up in your solution. 

Try this XML instead:


<Target Name="BeforeClean">
<Exec WorkingDirectory="$(CommonProgramFiles)\ArcGIS\bin" Command="esriRegasm.exe &quot;$(TargetPath)&quot; /v 9.4 /p Desktop /u /s" Condition="Exists('$(TargetPath)')" />
</Target>
<Target Name="AfterBuild">
<Exec WorkingDirectory="$(CommonProgramFiles)\ArcGIS\bin" Command="esriRegasm.exe &quot;$(TargetPath)&quot; /v 9.4 /p Desktop /s" />
</Target>
0 Kudos
ErikNyberg
Deactivated User
I get the same error message even with your new XML.

I had already tried to amend the XML since the one in the documentation gives me a build error. I also tried with a hardcoded path to the dll but with the same result.

I have 4 different extensions and 2 of them register sucessfully but 2 fails. Is there anywhere I can get more information on why they fail? Or can I manually add them? I saw the config files in the C:\Program Files\Common Files\ArcGIS\Desktop9.4\Configuration\CATID folder??
0 Kudos
BillSmith
Regular Contributor
The files in the Configuration folder are just zip files.  If you change the extension to .zip, you should be able to extract the config.xml file to see what it looks like.
0 Kudos
ErikNyberg
Deactivated User
Yes, I have tried to manually create a new file (based on the 2 that works) but ArcMap does not pick up the extensions anyway. Does it matter what order I have on my clsids and catids?

Also, I would suggest ESRI to implement a /errorlog parameter to esriRegasm.exe so that I can see the detailed errormessage if the registration fails. Now it very hard to troubleshoot why it is failing.
0 Kudos
ErikNyberg
Deactivated User
I now tried to create a new 9.4 startup project and moved the stuff across from the old project but it still fails when it is trying to register the dll. So I guess I have to go through it step by step to see where it breaks..
0 Kudos
ErikNyberg
Deactivated User
I have now recreated the startup project for 9.4 so it now works.

I dont know why the old project failed during registration and I would recommend ESRI to add a /errorlog parameter to ESRIRegAsm.exe that shows a more detailed errormessage.
0 Kudos
SteveVan_Esch
Esri Contributor
How can I obtain additional information concerning failures while registering DLLs/Assemblies using ESRIRegAsm?

ESRIRegAsm supports an optional diagnostic mode enabled using the /debug command line option.  This option will display a console window where the registration process is logged in detail.
0 Kudos