Build Failed - Failed to register Add-in

10168
13
09-07-2010 04:06 PM
MikeLouwrens
Occasional Contributor III
I have been going through the Add-in walkthrough and when I try to Build I get an error "Failed to register Add-in 'CustomUIElements.esriAddIn'"

This is the Build Output:

------ Build started: Project: CustomUIElements, Configuration: Release Any CPU ------
C:\WINDOWS\Microsoft.NET\Framework\v3.5\Csc.exe /noconfig /nowarn:1701,1702 /errorreport:prompt /warn:4 /define:TRACE /reference:C:\ArcGIS\DeveloperKit10.0\DotNet\ESRI.ArcGIS.ArcMapUI.dll /reference:C:\ArcGIS\DeveloperKit10.0\DotNet\ESRI.ArcGIS.Carto.dll /reference:C:\ArcGIS\DeveloperKit10.0\DotNet\ESRI.ArcGIS.Desktop.AddIns.dll /reference:C:\ArcGIS\DeveloperKit10.0\DotNet\ESRI.ArcGIS.Display.dll /reference:C:\ArcGIS\DeveloperKit10.0\DotNet\ESRI.ArcGIS.Framework.dll /reference:C:\ArcGIS\DeveloperKit10.0\DotNet\ESRI.ArcGIS.Geometry.dll /reference:C:\ArcGIS\DeveloperKit10.0\DotNet\ESRI.ArcGIS.System.dll /reference:"c:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll" /reference:"c:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Data.DataSetExtensions.dll" /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /reference:"c:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Xml.Linq.dll" /debug:pdbonly /filealign:512 /optimize+ /out:obj\Release\CustomUIElements.dll /target:library Properties\AssemblyInfo.cs ZoomToLayerButton.cs AddGraphicsTool.cs Config.Designer.cs
Compile complete -- 0 errors, 0 warnings
CustomUIElements -> C:\VisualStudio\Projects\CustomUIElements\CustomUIElements\bin\Release\CustomUIElements.dll
Successfully created Add-in "CustomUIElements" -> 'C:\VisualStudio\Projects\CustomUIElements\CustomUIElements\bin\Release\CustomUIElements.esriAddIn'.
esriRegAddin.exe "C:\VisualStudio\Projects\CustomUIElements\CustomUIElements\bin\Release\CustomUIElements.esriAddIn" /s
C:\Program Files\MSBuild\ESRI\ESRI.ArcGIS.AddIns.targets(125,5): error : Failed to register Add-in 'CustomUIElements.esriAddIn'.
Done building project "CustomUIElements.csproj" -- FAILED.
========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========


Software:
Visual Studio 2008
ArcGIS 10
XP Pro 32bit

I didn't use the sample data, just followed the walkthrough and ran Build when it told me to ("Installing the custom button and tool" section)

Any ideas on what's happening?

Cheers,
Mike.
0 Kudos
13 Replies
EagerIp
New Contributor II
The build output doesn't give much clue. Can you try the esriRegAddIn utility in a cmd prompt without the silent flag and see if it gives you more information? For example,

cd \Program Files\Common Files\ArcGIS\bin
esriRegAddin.exe "C:\VisualStudio\Projects\CustomUIElements\CustomUIElements\bin\Release\CustomUIElements.esriAddIn"

There can be error in the config.esriaddinx file or ArcGIS not installed properly. Do you have Desktop installed?
0 Kudos
MikeLouwrens
Occasional Contributor III
The build output doesn't give much clue. Can you try the esriRegAddIn utility in a cmd prompt without the silent flag and see if it gives you more information? For example,

cd \Program Files\Common Files\ArcGIS\bin
esriRegAddin.exe "C:\VisualStudio\Projects\CustomUIElements\CustomUIElements\bin\Release\CustomUIElements.esriAddIn"

There can be error in the config.esriaddinx file or ArcGIS not installed properly. Do you have Desktop installed?


Hi, thanks for your response.

Yes I have ArcGIS Desktop installed (Full install)

I ran the esriRegAddIn from a cmd prompt, and I get this message:

---------------------------
ESRI ArcGIS Add-In Installation Utility
---------------------------
Installation failed.
Access is denied. The specified add-in file may be in use.
---------------------------
OK  
---------------------------

As far as I know the add-in file is not in use.  I have just restarted my computer, don't have Visual Studio or ArcGIS running, but I get that message.  The files are all local to this computer, and I am admin so it shouldn't be an access/permissions issue.
I have run a Repair on the .net sdk, should do the same for ArcMap?

I will also try uninstalling then reinstalling the sdk now.

Mike.
0 Kudos
MikeLouwrens
Occasional Contributor III
This may or may not be relevant, but if I try to install an add-in from the Customize dialog within ArcMap, I get a message that says something along the lines of "No UI Elements found"

Mike.
0 Kudos
MikeLouwrens
Occasional Contributor III
I have uninstalled and reinstalled ArcGIS Desktop, and still have the same issue.

I now think this is something to do with ArcGIS Desktop, and not something wrong with my VS Project, as I have downloaded an ESRI Add-In (The new Water Editing Tools) and I get the same message when I try to install it:

---------------------------
ESRI ArcGIS Add-In Installation Utility
---------------------------
Installation failed.
Access is denied. The specified add-in file may be in use.
---------------------------
OK  
---------------------------

I think maybe I'll send this to Support, unless someone has come across this and has a solution? 🙂

Cheers,
Mike.
0 Kudos
EagerIp
New Contributor II
Looks like you cannot deploy any add-in at all on this particular machine 😞

The error message generally means during the file copy operation you don't have the correct permission to deploy the add-in to [My Documents]\ArcGIS\AddIns\Desktop10.0 folder. I know you've mentioned you have admin privileges but you may want to double check if you can write to that folder.
0 Kudos
MikeLouwrens
Occasional Contributor III
Looks like you cannot deploy any add-in at all on this particular machine 😞

The error message generally means during the file copy operation you don't have the correct permission to deploy the add-in to [My Documents]\ArcGIS\AddIns\Desktop10.0 folder. I know you've mentioned you have admin privileges but you may want to double check if you can write to that folder.
Is it possible to change that folder location?  I think it now all makes sense 🙂  I have a quota on my MyDocuments folder, and I've passed it... I'll delete some files to see if that helps, but would be keen to change that location if possible??

Thanks,
Mike.
0 Kudos
EagerIp
New Contributor II
EsriRegAddin only deploys to the current user location at 10.0. Instead of typing the long command in a command prompt, it is more convenient to just double click the .esriAddIn file. It should spin up EsriRegAddin.exe and its wizard. See if this gives you more clue on what's wrong with the deployment.
0 Kudos
RoyJackson1
New Contributor III
For me, my Documents and Settings is on a shared network drive.  This drive was full.  When I cleared some stuff out, registration worked.  Annoying!
0 Kudos
GraceCai
New Contributor
If anyone still cares this could be a registry problem. That's how i resolved it anyways.

There's some info on this page:
http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/Advanced_add_in_concept...

Basically they tell you to change the BlockAddIns registry to 0. However, I found that the path they provided wasn't where my BlockAddIns registry is located. So if you can't find HKEY_LOCAL_MACHINE\SOFTWARE\ESRI\Desktop10.0\Settings try HKEY_LOCAL_MACHINE > SOFTWARE > Wow6432Node > ESRI > Desktop10.0 > Settings

Hope this helps.
0 Kudos