I have an ArcGIS Pro Add-in built with .NET platform, targeting version 2.3
I'd like to update it to run in 2.9, but keeps it compatible with previous versions.
Is there any way to target multiple versions in AddInfo/TargetVersion?
Or which will be the better way to make it work in more than one version?
Thanks!
If you develop an add-in under version 2.3 it will work for all newer 2.x releases (including 2.9), without having to rebuild the 2.3 add-in under 2.9.
ProConcepts Advanced Topics · Esri/arcgis-pro-sdk Wiki (github.com)
The compatibility is defined by the 'desktopVersion' attribute of the 'AddInInfo' tag in config.daml. 'desktopVersion' defines the oldest release your add-in is compatible with, however, compatibility is only maintained within each mayor version number (1.x, 2.x, 3.x). So a 2.3 desktopVersion will not work with 3.x.
All 2.0 add-ins will load in any 2.x version of ArcGIS Pro so you don't have to rebuild the Add-In for every release. Version 3.0 is a breaking change and will require refactoring since it uses .Net 6 vs. Framework .Net 4.8.
Key controlling factor is the settings in our config.daml file. The version number shown should always be 2.0 for Add-Ins for that major release.
<ArcGIS defaultAssembly="BasicMapTool2.dll" defaultNamespace="BasicMapTool2" xmlns="http://schemas.esri.com/DADF/Registry" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.esri.com/DADF/Registry file:///C:/Program%20Files/ArcGIS/Pro/bin/ArcGIS.Desktop.Framework.xsd">
<AddInInfo id="{aa226987-8efd-4d34-b606-3e731c8cd2ff}" version="2.0" desktopVersion="2.9.0">
<Name>MapCoordinatesTool</Name>
After I updated this to run under ArcGIS Pro 3.x the second line became:
<AddInInfo id="{aa226987-8efd-4d34-b606-3e731c8cd2ff}" version="3.0" desktopVersion="3.0.3.36057">
Hi @RichardDaniels,
I applied the same values you are using for the AddInfo attributes: version="2.0" desktopVersion="2.9.0".
Then I tried to load the add-in using ArcGIS Pro 2.6, and there is an error:
"This add-in cannot be loaded because it targets an incompatible version of ArcGIS Pro. Current version 2.6 Add-in targets: 2.9".
Am I missing anything?
Thank you!
the AddInInfo attribute desktopVersion="2.9.0" shows the MINUMUM 2.x release number your add-in is compatible with. This means that your add-in only works with 2.9.0, 2.9.1, 2.9.2 ... 2.10.0 etc. NOT with 2.6