Tuesday, 12 May 2015

arcgis desktop - Is it possible to target an ArcMap add-in to an earlier version?


My development environment is Visual studio 2010 with ArcGIS Desktop 10.1 installed. I need my add-in to support 10.0 AND 10.1. Right now, if I try to install it on ArcMap 10.0, it fails.


Is it possible to target an ArcMap add-in to an earlier version?



Answer



It's possible to make it work with ArcMap 10.0, but it's not easy and deployment-friendly


First, in your visual studio project, set your target framework to .NET Framework 3.5.


Then, edit the Config.esriaddinx file and modify the "Targets" section to add compatibility with ArcGIS Desktop 10.0, like this:



  




Finally, as described in an older post, you have to alter the ArcMap.exe.config by adding the following line inside each "dependentAssembly" block




Once modified, it should look like this


    








I came to the conclusion that even if it's possible, I'm better off compiling with the lowest version of ArcMap I'm willing to support.


EDIT: See also Rich Wawrzonek's post for an alternative (not recommended by ESRI)


EDIT2: According to Esri, the best way is set up a virtual machine with 10.0 installed on it (see this post)



No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...