How do I create a shared Add-In?

981
2
Jump to solution
08-30-2016 09:11 AM
Highlighted
New Contributor III

Hello together,

In ArcGIS Pro 1.3 Backstage at the Add-In Manager Property Page I can see that there is a section called "Shared Add-Ins". What  does this mean? Can I create some kind of a "Base"-Add-In which is available to all (my) other Add-Ins?

My current issue is: Instead of one big, fat Add-In which contains all possible extensions and hooks I have several smaller Add-Ins which extend the ArcGIS Pro Application with always a single (optional) aspect. E.g.: One Add-In that backfits some specific identify functionality, and one Add-In that allows to do some session management around versions. Both Add-Ins share some common business libraries from our company. But because they are in different Add-Ins I get two copies of those company libs in the Esri ArcGIS Pro Add-In assembly caches.

Is a "Shared Add-In" something which can solve that Issue?

Thanks in advance!

.Karl

Tags (2)
Reply
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Esri Contributor

Hi Karl,

In the case of two or more Add-ins referencing a copy of the same assembly, the first Add-in to load will load that assembly. Even though the referenced assembly has been copied to 2 places (i.e. two different assembly cache folders), it will only be loaded once (by the first Add-in that uses it). With a "mega" Add-in then only one copy of the referenced library is deployed (rather than individual copies per Add-in) but that doesn't change the assembly loading behavior as such but this may or may not be more practical to manage.

On the question of "Shared Add-ins" on the Add-in Manager backstage tab: Same as with 10x, additional add-in folders (beyond the default user add-in folder) can be specified via the registry from which Add-ins are loaded. These folders can be specified for all users of the machine (via HKLM) or just a specific user (HKCU). This is documented here. Add-ins loaded from Add-in folders specified under the HKLM Add-in folders key are considered "shared" and show up in that list. 

View solution in original post

2 Replies
Highlighted
Esri Contributor

Hi Karl,

In the case of two or more Add-ins referencing a copy of the same assembly, the first Add-in to load will load that assembly. Even though the referenced assembly has been copied to 2 places (i.e. two different assembly cache folders), it will only be loaded once (by the first Add-in that uses it). With a "mega" Add-in then only one copy of the referenced library is deployed (rather than individual copies per Add-in) but that doesn't change the assembly loading behavior as such but this may or may not be more practical to manage.

On the question of "Shared Add-ins" on the Add-in Manager backstage tab: Same as with 10x, additional add-in folders (beyond the default user add-in folder) can be specified via the registry from which Add-ins are loaded. These folders can be specified for all users of the machine (via HKLM) or just a specific user (HKCU). This is documented here. Add-ins loaded from Add-in folders specified under the HKLM Add-in folders key are considered "shared" and show up in that list. 

View solution in original post

Highlighted
Esri Contributor

Clarification: >>>In the case of two or more Add-ins referencing a copy of the same assembly, the first Add-in to ~load~ will load that assembly<<<

In the case of two or more Add-ins referencing a copy of the same assembly, the first Add-in to ~use~ that assembly will load that assembly.