PROBLEM
On migrating an ArcObjects 10.1 add-in in Visual Studio 2010, to an ArcObjects 10.2.x add-in in Visual Studio 2012, the *.esriAddinx file is not be generated when building the project. This can be confirmed by checking the project's bin folder. Visual Studio 2012 generates the following warning message:
"Unable to create .esriAddin; missing ESRI ArcGIS Add-in SDK component(s)."
The exact same warning message is generated when migrating an ArcObjects 10.3.x add-in in Visual Studio 2013 to an ArcObjects 10.4.x add-in in Visual Studio 2015. The causes are related, but are exact opposites of each other.
For the first case, this issue occurs because the path name for the .targets file of the installed Microsoft Build Engine (MSBuild) in the software development kit (SDK) for Visual Studio 2012 is structured differently than in Visual Studio 2010. The number 11 is not included as the version number for the version being targeted in the path name of the add-in, as can be seen in the XML code of the add-in project file below:
Conditions="!Exists('$(MSBuildExtensionsPath)\ESRI\ESRI.ArcGIS.AddIns.targets')"
In the latter case of migrating to Visual Studio 2015, the exact opposite situation occurs. The XML code in the add-in project file contains the integer 11, yet it should not be there:
Conditions="!Exists('$(MSBuildExtensionsPath)\ESRI\ESRI.ArcGIS.AddIns.11.targets')"
The integer 11 was added for Visual Studio 2012 and Visual Studio 2013, and removed at version 2015.
For the first case of migrating to Visual Studio 2012, edit the XML tags in the project file containing the path ESRI.ArcGIS.AddIns.targets as follows:
C:\Program Files (x86)\MSBuild\Esri\ESRI.ArcGIS.AddIns.targets
C:\Program Files (x86)\MSBuild\Esri\ESRI.ArcGIS.AddIns.11.targets
Note: The new path name contains number 11 as the version number.
Note: For the project to reflect the changes, close and reopen the project file and rebuild the project. The project builds successfully, the warning message does not display any more, and the *.esriAddinx file is generated correctly. The generation of the add-in can be confirmed in the project's bin folder.
In the latter case of migrating to Visual Studio 2015, the exact opposite steps should be taken in step 2 above. Remove the integer 11 from the three XML tags in the project file. This also applies when migrating an old Add-in project at version 10.2.x, or 10.3.x to any later version, 10.4.x -10.8.x.
Get help from ArcGIS experts
Download the Esri Support App