Select to view content in your preferred language

ArcMap extension will not register

1044
2
02-11-2010 05:46 AM
CarlHorton
Emerging Contributor
I wrote a new extension for arcmap and am trying to register it.  I've tried ESRIRegAsm and right clicking on the dll and choosing Register 9.4 Assembly.  Keep getting Registration failed message.  How can I register this extension?

Jeff
0 Kudos
2 Replies
MarcBate
Frequent Contributor
If you're targeting the .NET framework 4.0, see http://forumsbeta.esri.com/showthread.php?t=1162

I was able to use ESRIRegasm with .NET 3.5 and 4.0 versions of my extension and used this batch file to make it easier (even set the post-build action in VS to run it on successful compile since ESRI's instructions weren't working).

 
IF "%PROCESSOR_ARCHITECTURE%"=="x86" if "%PROCESSOR_ARCHITEW6432%"=="" GOTO  X86
SET ProgramFilesPath=%ProgramFiles(x86)%
GOTO REGASM
:X86
SET ProgramFilesPath=%ProgramFiles%
:REGASM
ECHO Registering assembly for COM interop...
"%ProgramFilesPath%\Common Files\ArcGIS\bin\ESRIRegAsm.exe" /s /p desktop /v 9.4 <File.dll>
IF ERRORLEVEL 0 GOTO REGOK
:REGERROR
ECHO ***There was a problem registering the assembly for COM Interop. 
GOTO END
:REGOK
ECHO Registration successful.
:END
0 Kudos
CarlHorton
Emerging Contributor
No luck.  I'm using .NET 3.5.
0 Kudos