PROBLEM

Unable to generate add-ins when migrating from older to newer versions of Visual Studio used in ArcMap

Last Published: November 24, 2021

Description

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.

Cause

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.

Solution or Workaround

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:

  1. Open the project file in Visual Studio. Right-click the project folder, and click Unload Project.
  2. Open the project file. Right-click the project folder, and click Edit Project.
  3. Change all XML tags containing the following path (these occur in three different tags):
    from:
C:\Program Files (x86)\MSBuild\Esri\ESRI.ArcGIS.AddIns.targets
to:
C:\Program Files (x86)\MSBuild\Esri\ESRI.ArcGIS.AddIns.11.targets
  1. Save the project file and close it.
Note:
The new path name contains number 11 as the version number.
[O-Image]
  1. Reload the project. Right-click the project folder, and click Reload Project.
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. 

Article ID: 000013261

Software:
  • ArcObjects SDK Microsoft NET Framework
  • ArcMap

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options