Select to view content in your preferred language

Old add-ins cached in ArcGIS 10.2, preventing updates

15236
11
02-05-2015 02:04 AM
RylandKarlovich
Deactivated User

We have recently been updating a custom AddIn for Arc10.2 and would like to understand the reasons behind an issue we are now encountering.

In order to update an add-in, we normally would delete the old version from within ArcGIS and uninstall it from the computer before installing the new version. It would now appear that ArcMap 10.2 however, caches components of the old version in the Assembly Cache such that it is not properly removed when we uninstall the add-in, and when we install the new add-in ArcGIS still references the old files.

Therefore, in order for our updates to take effect we have found that we also need to clear any old add-in content from the Assembly Cache before installing the new add-in. We did not find this to be an issue in previous versions of ArcGIS.

Has anyone else seen this behaviour? We would expect to be able to update add-ins by going through the normal delete/add process and should not have to access the Assembly Cache in the process.

11 Replies
RichardDaniels
Honored Contributor

I still have this problem with 10.3.1.

C:\Users\<user id here>\AppData\Local\ESRI\Desktop10.3\AssemblyCache is updated with the new version of the the add-in from the well-known location but the old version is not removed from the cache, this results in two versions of the Add-in being displayed in ArcGIS Desktop.

Supposedly if you including the .esriAddIn at your well known file location (along with the .config and .dll file we created) force ArcMap to updated/refersh the Add-in if the information in the esriAddIn file indicts that it is newer that what is cached in the AccemblyCache? When Add-in's were first released I thought that was the intent.

To solve your problem delete all files from C:\Users\<user id here>\AppData\Local\ESRI\Desktop10.3\AssemblyCache, also in your new Add-In ensure you update the build date and version number.

Rich D.

DanielBean
Deactivated User

Although this is an old post, I thought I was hitting the same problem in 10.4 for an add-in.  I was changing the python code and making a new .esriaddin file with makeaddin.py, yet the changes were not reflected.  It was not a cache problem, rather it was me not reinstalling the updated esriaddin.  After you make the .esriaddin file, you must double-click on it to execute the installation wizard.  This registers and makes a copy of your updated .esriaddin file to where ArcMap looks for it.

If you skip the last step, you run the old python code.  You can verify this by searching for your .esriaddin file, you will find two files.  The one that ArcMap looks at is in the directory

C:\Users\<User>\Documents\ArcGIS\AddIns\Desktop10.4\{832e6995-0daa-48aa-940f-0b6a04e3a5fe} or similar

and is copied there by the installation utility.

So to test changed python code:

1) Save the python code (.py) file

2) Run makeaddin.py  (which writes the local .esriaddin file, but not the one ArcMap looks at)

3) Double-click on the .ersiaddin file to invoke the add-in installation utility and install

(Step 3 was missing in the ESRI docs)

The correct version will be available in ArcMap,  When debugging, remember to open the ArcMap Python console to see any python code errors.