Select to view content in your preferred language

Shared Add-Ins Not Updating - Possible Cause

3686
1
Jump to solution
06-30-2014 12:55 AM
DonOBrien
New Contributor
An "undocumented feature" of ArcGIS I have found dealing with shared add-ins can give you the impression updating from the shared folder is not working. One cause of this is older versions of the add-in in sub-folders of the shared folder.

Example scenario:
- Add-in "myArcMapTools.esriAddIn" stored in a shared folder "G:\ESRI\SharedAddins\"
- When updating the add-in, you archive the old add-ins to a sub-folder of this folder so that you can revert back to an old copy
- ie. Backup add-in "myArcMapTools.esriAddIn.bak" stored in sub-folder "G:\ESRI\SharedAddins\Archive\"

When ArcGIS opens, it not only searches the shared folder, but sub-folders of that shared folder, and also locates any add-in files regardless if whether the file extension is ".esriAddIn" or not. ArcGIS will install the add-in (with the same CLSID) with the oldest created date, thus in the above scenario, the backup add-in will be installed, and not the updated add-in.

This is possibly expected behavior, but it is undocumented. It is also possible that the search for add-ins is recursive and thus if you have your add-in in the root of a shared drive, ArcGIS will search all folders and sub-folders within that drive for add-ins (which may produce performance issues and undesirable results.)

The fix/workaround for the above scenario is to not have the backup versions in a sub-folder, but in a different folder altogether
- Add-in "myArcMapTools.esriAddIn" stored in a shared folder "G:\ESRI\SharedAddins\"
- Backup add-in "myArcMapTools.esriAddIn.bak" stored in folder "G:\ESRI\ArchivedAddins\"
1 Solution

Accepted Solutions
seria
by Esri Contributor
Esri Contributor


ArcGIS honors the Addin that was most recently added to the Well-Known folder, even if it is more outdated than the current Add-in.

I tested the below workflow on ArcGIS 10.3.1 to reach the above conclusion.

1- Create an Addin called ArcMapAddin1 in Visual Studio, and create a button that pops up a message box that reads "This is Addin1 before an update". Build your Visual Studio project so as to output the *.esriaddin file.

2- Copy the ArcMapAddin1.esriaddinx file from the bin folder to a well-known folder, e.g. C:\Temp

3- Run ArcMap.

4- ArcMap's Addin Manager shows that a "shared-Addin" called Addin1 has been recently installed.

5- From the Customize menu, drag the Addin1 button to a toolbar, and click it.

6- A message box is displayed; as expected, it reads "This is Addin1 before an update"

7- Close ArcMap.

8 - Make a small change to the Addin1 in Visual Studio. Change the Message Box to read "This is an UPDATED Addin1". Clean and rebuild your project so as to output an updated *.esriaddin file in the bin folder of your project.

9 - Copy the updated *.esriaddin file from the bin folder over to a new folder one level below your Well-Known Folder, for example, C:\Temp\Update.

10- Open ArcMap and click the Addin1 button on the toolbar.

11- You should see a message box that reads "This is an UPDATED Addin1".

12- Copy both Addins from the Well-Known folder to a temporary location, e.g. C:\Temp2\Addin1 and C:\Temp2\Addin1\Update.

13- Delete the two Addins from the Well-Known folder

14- Then, copy the Addin in C:\Temp2\Addin1\Update to C:\Temp. This is the most recently created Addin.

15- Run ArcMap and click on the button. You will get the message "This is an UPDATED Addin1".

16- Now, Copy the Addin in C:\Temp2\Addin1 to C:\Temp\Update. This is the more outdated Addin.

17 - Run ArcMap and click on the button. You will get the message "This is Addin1 before an update"

18- Thus, ArcMap honors the Addin that was most recently copied to the Well-Known Folder, regardless of whether it is more outdated than the existing one. It does not honor the date of creation of the Add-in.

View solution in original post

1 Reply
seria
by Esri Contributor
Esri Contributor


ArcGIS honors the Addin that was most recently added to the Well-Known folder, even if it is more outdated than the current Add-in.

I tested the below workflow on ArcGIS 10.3.1 to reach the above conclusion.

1- Create an Addin called ArcMapAddin1 in Visual Studio, and create a button that pops up a message box that reads "This is Addin1 before an update". Build your Visual Studio project so as to output the *.esriaddin file.

2- Copy the ArcMapAddin1.esriaddinx file from the bin folder to a well-known folder, e.g. C:\Temp

3- Run ArcMap.

4- ArcMap's Addin Manager shows that a "shared-Addin" called Addin1 has been recently installed.

5- From the Customize menu, drag the Addin1 button to a toolbar, and click it.

6- A message box is displayed; as expected, it reads "This is Addin1 before an update"

7- Close ArcMap.

8 - Make a small change to the Addin1 in Visual Studio. Change the Message Box to read "This is an UPDATED Addin1". Clean and rebuild your project so as to output an updated *.esriaddin file in the bin folder of your project.

9 - Copy the updated *.esriaddin file from the bin folder over to a new folder one level below your Well-Known Folder, for example, C:\Temp\Update.

10- Open ArcMap and click the Addin1 button on the toolbar.

11- You should see a message box that reads "This is an UPDATED Addin1".

12- Copy both Addins from the Well-Known folder to a temporary location, e.g. C:\Temp2\Addin1 and C:\Temp2\Addin1\Update.

13- Delete the two Addins from the Well-Known folder

14- Then, copy the Addin in C:\Temp2\Addin1\Update to C:\Temp. This is the most recently created Addin.

15- Run ArcMap and click on the button. You will get the message "This is an UPDATED Addin1".

16- Now, Copy the Addin in C:\Temp2\Addin1 to C:\Temp\Update. This is the more outdated Addin.

17 - Run ArcMap and click on the button. You will get the message "This is Addin1 before an update"

18- Thus, ArcMap honors the Addin that was most recently copied to the Well-Known Folder, regardless of whether it is more outdated than the existing one. It does not honor the date of creation of the Add-in.