Can you configure a ProAddin to auto-update from a Git repo?

654
1
Jump to solution
03-12-2021 08:41 AM
JohnMDye
Regular Contributor

We have an ArcGIS Pro Addin that we deploy to all end user systems via the AddinFolder registery key.

As explained by @Wolf in this post, the process that a ProAddin follows when using this mechanism for Addin deployment is:

  1. Each time Pro starts up, Pro checks the well-known addinFolders locations for esriAddinX files, and unzips the add-in content (in the 'esriaddinx' file) under the log-in user profile folder: ...\AppData\Local\ESRI\ArcGISPro\AssemblyCache.  
  2. When the add-in is instantiated by Pro that folder location (…\AppData\Local…) is used to load the Dlls required to run the add-in.
  3. If you delete the AssemblyCache folder completely step 1. above will repeat.

What's not stated is that this also works for distributing updates. Somewhere behind the scenes, there is probably some checksum wizardry going on to see if the files in the assembly cache match the files in well-known addinFolder to determine if it needs to unzip the remote addin again. Also, if you delete an addin file from the remote folder, it gets removed from the local assembly cache.

All of this is great and it works pretty smoothly, but we'd like to not be required to use a publicly accessible shared drive. We already keep all of the source for our addins in a Git repo wth releases for each new update of the addin.

Is there any way to set up a Pro Addin to download the esriAddin file from a Git repo, and always check for new releases from that repo? 

1 Solution

Accepted Solutions
Wolf
by Esri Regular Contributor
Esri Regular Contributor

Pro Addins cannot be automatically downloaded from a Github repo release.  You can however use the GitHub Rest API to write your own extension to your add-in to perform this task.  Using the GitHub Rest API (i.e. https://github.com/octokit/octokit.net ) your add-in can check and download the latest release and update itself in any local well-known folder.

View solution in original post

1 Reply
Wolf
by Esri Regular Contributor
Esri Regular Contributor

Pro Addins cannot be automatically downloaded from a Github repo release.  You can however use the GitHub Rest API to write your own extension to your add-in to perform this task.  Using the GitHub Rest API (i.e. https://github.com/octokit/octokit.net ) your add-in can check and download the latest release and update itself in any local well-known folder.