How to disable 'esriRegAddin' after build has completed?

533
2
03-05-2012 07:26 AM
SzymonPiskula
New Contributor
Hi,

I've created an EsriAddIn project. It is configured by default to register the addin after the build has completed. Does anyone know how to disable it? I don't want my addin to be automatically registered with arc map, i want to do it manually.

Thanks
0 Kudos
2 Replies
RichWawrzonek
Occasional Contributor
COM extensions make an entry in the registry but I don't think add-ins are 'registered'. When you build your add-in solution in the IDE a folder with the project's GUID is added to <user's documents>\ArcGIS\AddIns\Desktop10.0 directory. When ArcMap is launched these local add-ins are copied to <window's user>\AppData\Local\ESRI\Desktop10.0\AssemblyCache. If you delete the GUID folder from your documents dir before ArcMap is opened it will prevent it from being 'installed'. If you are using Visual Studio you can set a post-build event in the project's properties to delete the folder that is copied to the documents dir after the sucessfull build. The folder that VS puts into the documents dir will be named using the GUID in the assembly information for your project.
0 Kudos
EdgarBejarano
Occasional Contributor
The automatic installation of the Add-In upon building the Add-in project in Visual Studio is most likely controlled by the ESRI.ArcGIS.Addins.targets file in
C:\Program Files (x86)\MSBuild\ESRI

That can technically be opened as a .txt and modified but I would take precautions and save a backup of the file.  That file appears to be invoked by the AfterBuild in

<Target Name="AfterBuild">
    <!-- Gives build warning when add-in targets file is not found. -->
    <Warning Text="Unable to create .esriAddin; missing ESRI ArcGIS Add-in SDK component(s)." Condition="!Exists('$(MSBuildExtensionsPath)\ESRI\ESRI.ArcGIS.AddIns.targets')" />
  </Target>

within the .vbproj or .csproj file which you can unload and edit by right-clicking on the Add-In project in the Solution Explorer.  However, I am not sure where in the .targets file that would be modified.
0 Kudos