Select to view content in your preferred language

How to Deploy an ArcGIS Pro Add In/ is .NET a Requirement?

1878
7
Jump to solution
04-27-2021 07:17 PM
AndersBerg1
Emerging Contributor

I have developed an add in and it works fine on my machine but I am having trouble deploying it to a client machine. The client machine has pro installed in 2.5.  I have figured out how to change the version from 2.7 to 2.5 and the add installs successfully.

However, the add in buttons grey out when they are clicked and do not respond. It appears as though ArcGIS pro does not know how to run my add in and complains about not being able to find button commands. Is there a setting in the configuration/deployment that I am missing in visual studio? So far I have just generated a release .esriAddinX with the defaults. The client machine does not have .NET framework installed, does it need to to have .net framework 4.8 installed in order to run my add in? Is there a best practice to remove this dependency? Basically, deploy my add in to any machine with ArcGIS Pro 2.5 and above and not worry about .NET. 

Thanks for your help in advance. 

0 Kudos
2 Solutions

Accepted Solutions
GKmieliauskas
Esri Regular Contributor

Hi,

If you want to run your add'in on different ArcGIS Pro versions you need to build it with the lowest ArcGIS Pro version SDK. Then you have chance what your add'in will work with higher versions of ArcGIS Pro. It depends on how much ArcGIS Pro SDK backward compatible with previous versions. It was a period when ArcGIS Pro SDK changed dramatically and was no chance that your previous version of add'in will work with new one. For example (from my experience): in ArcGIS Pro 2.6 you can run geoprocessing function Excel To Table when ArcGIS Pro starts, on 2.7 it does not work. Now it is more less stable.

View solution in original post

Wolf
by Esri Regular Contributor
Esri Regular Contributor

Yes for version 2.5 that is all that's required since release 2.5 of Pro was already running on .Net Framework 4.8 (Home · ArcGIS/arcgis-pro-sdk Wiki (github.com).  However, you should build your add-in with version 2.5 of ArcGIS Pro (and Pro SDK) installed on your development machine because newer (minor version) releases of Pro add functionality to the API that are not available in 2.5.  So if you build an Add-in targeted for 2.5 on a 2.8 development environment (with Pro 2.8 installed) you could potentially use a method or property that is only available in 2.8 and not in 2.5.  So your add-in would work fine on your development machine, but on your 2.5 machine you would experience the 'gray' buttons effect (which implies an exception was thrown on initialization). 

View solution in original post

7 Replies
DanPatterson
MVP Esteemed Contributor

ArcGIS Pro 2.7 system requirements—ArcGIS Pro | Documentation

requires net framework 4.8 to run ArcGIS Pro, if your add in runs in Pro, then yes

Manage add-ins—ArcGIS Pro | Documentation

 not seeing any obvious solution


... sort of retired...
0 Kudos
GKmieliauskas
Esri Regular Contributor

Hi,

If you want to run your add'in on different ArcGIS Pro versions you need to build it with the lowest ArcGIS Pro version SDK. Then you have chance what your add'in will work with higher versions of ArcGIS Pro. It depends on how much ArcGIS Pro SDK backward compatible with previous versions. It was a period when ArcGIS Pro SDK changed dramatically and was no chance that your previous version of add'in will work with new one. For example (from my experience): in ArcGIS Pro 2.6 you can run geoprocessing function Excel To Table when ArcGIS Pro starts, on 2.7 it does not work. Now it is more less stable.

AndersBerg1
Emerging Contributor

Thank you, that is very informative. When I tried to make my add in compatible with 2.5, I just changed the setting in the config.daml. When building a project to a particular version, is there a setting in visual studio to name the version? or does it just build to the version of arcgis pro that is install on the local machine?

0 Kudos
Wolf
by Esri Regular Contributor
Esri Regular Contributor

This Pro Concept delves into compatibility:  ProConcepts Advanced Topics · ArcGIS/arcgis-pro-sdk Wiki (github.com).  The paragraph that concerns your issue is this one:

Add-ins and configurations are forwards compatible across all minor versions of ArcGIS Pro. Add-ins and configurations are not forward compatible across major versions (eg 2.x, 3.x, etc). Add-ins and configurations are not backwards compatible across any versions of ArcGIS Pro.

AndersBerg1
Emerging Contributor

Thank you for pointing this out, its good to know. I simply changed the version in the config.daml as another help article pointed out. But it is good to know, that it is only forwards compatible. 

0 Kudos
Wolf
by Esri Regular Contributor
Esri Regular Contributor

Yes for version 2.5 that is all that's required since release 2.5 of Pro was already running on .Net Framework 4.8 (Home · ArcGIS/arcgis-pro-sdk Wiki (github.com).  However, you should build your add-in with version 2.5 of ArcGIS Pro (and Pro SDK) installed on your development machine because newer (minor version) releases of Pro add functionality to the API that are not available in 2.5.  So if you build an Add-in targeted for 2.5 on a 2.8 development environment (with Pro 2.8 installed) you could potentially use a method or property that is only available in 2.8 and not in 2.5.  So your add-in would work fine on your development machine, but on your 2.5 machine you would experience the 'gray' buttons effect (which implies an exception was thrown on initialization). 

AndersBerg1
Emerging Contributor

Excellent, thank you for clearing that up for me!

0 Kudos