Thursday 19 January 2017

vb.net - Unable to create .esriAddin; missing ESRI ArcGIS Add-in SDK components(s)?


What am I missing? I upgraded to ArcGIS 10.3 succesfully recompiled all other 20 or so addins after encountering a similar issue and renaming "ESRI.ArcGIS.AddIns.11.targets" to "ESRI.ArcGIS.AddIns.targets" possibly due to a known defect (#01599069)


Now I would like to create a brand new addin but I get the same warning. If if rename "ESRI.ArcGIS.AddIns.targets" back to "ESRI.ArcGIS.AddIns.11.targets" the warning dissapears and addin seems to compile but none of my old addins will recompile raising the same old error.


If i copy and paste the "ESRI.ArcGIS.AddIns.targets" and also keep the "ESRI.ArcGIS.AddIns.11.targets" both the old and new addins compile without errors or warning but the new addins ref ID are not recognized by the older upgraded addins.



I am pretty much completely confused as to what needs to be done here to make this work.



Answer



I did not per se figure it out becuase i don't really understand what is going on here but I was trying different things until it worked. I am not sure whether it is suppose to work or whether this crudity can even be called a workaround but here it goes:


Keep both "ESRI.ArcGIS.AddIns.targets" and "ESRI.ArcGIS.AddIns.11.targets" in the "C:\Program Files (x86)\MSBuild\Esri\" directory. (copy ESRI.ArcGIS.AddIns.11.targets paste it in the same directory and rename it to ESRI.ArcGIS.AddIns.targets)


Initially it did not work because I was trying to test it on the project i created prior the above-mention change. Well it did work in the sense that I was not getting errors when i compiled both types of addins (those upgraded to 10.3 and those newly created in 10.3) I then for some reason decided to delete the new project and start over and IT WORKED! It this therefore important to make the change in "C:\Program Files (x86)\MSBuild\Esri\" prior to creating any new addins.


EDIT: it is now August 2016 and I am migrating from 10.3.1 to 10.4.1 where the SDK requires VS 2013 or in my case 2015 Community (the free version). Targetting .Net 4.5 is now a requirement! I run into the same issue here with SOME of the Addins not creating the .addin file. Solution is pretty much the same: Copy and paste the same 2 files in the above mentioned directory and change the name from ESRI.ArcGIS.AddIns.targets to ESRI.ArcGIS.AddIns.11.targets and ESRI.ArcGIS.Server.SDK.targets to ESRI.ArcGIS.Server.SDK.11.targets respectively. Keep both the original and the renamed files in this directory!


enter image description here


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...