AnsweredAssumed Answered

How to use Visual Studio 2015 to compile ArcGIS 10.3.1 Addin project?

Question asked by pliottawa888 on Sep 3, 2016
Latest reply on Jun 17, 2017 by mike.robb

How to use Visual Studio 2015 to compile ArcGIS 10.3.1 Addin project?

 

Looks I need to modify the file: ESRI.ArcGIS.AddIns.11.targets, but still doesn't work. My Visual Studio 2015 project uses .NET Framework 4.5.2.

 

After modifying the file as seen below, even I get more errors from the compiling when using ArcGIS 10.3.1 and Visual Studio 2015. Because I am using Visual Studio 2015 and ArcGIS 10.3.1, so I see I need to change the following conditions in ESRI.ArcGIS.AddIns.11.targets, in order to avoid compiling error for ESRI Addin:

 

from:

Condition="'$(VisualStudioVersion)' == '12.0'"

to

Condition="'$(VisualStudioVersion)' == '14.0'"

 

  <UsingTask AssemblyName="ESRI.ArcGIS.AddIns.SDK.12, Version=10.3.0.0, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86" TaskName="PackageAddIn" Condition="'$(VisualStudioVersion)' == '12.0'" />
  <UsingTask AssemblyName="ESRI.ArcGIS.AddIns.SDK.12, Version=10.3.0.0, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86" TaskName="ValidateAddInXMLTask" Condition="'$(VisualStudioVersion)' == '12.0'" />
  <UsingTask AssemblyName="ESRI.ArcGIS.AddIns.SDK.12, Version=10.3.0.0, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86" TaskName="ConvertToRelativePath" Condition="'$(VisualStudioVersion)' == '12.0'" />
  <UsingTask AssemblyName="ESRI.ArcGIS.AddIns.SDK.12, Version=10.3.0.0, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86" TaskName="ResolveAddInReference" Condition="'$(VisualStudioVersion)' == '12.0'" />

 

Before modifying the file, the compiling errors are:

 

C:\Program Files (x86)\MSBuild\ESRI\ESRI.ArcGIS.AddIns.11.targets(41,5): error MSB4036: The "ValidateAddInXMLTask" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with <UsingTask> in the project file, or in the *.tasks files located in the "C:\Program Files (x86)\MSBuild\14.0\bin" directory.

 

After modifying the file, the compiling errors are:

 

\Program Files (x86)\MSBuild\ESRI\ESRI.ArcGIS.AddIns.11.targets(41,5): error MSB4018: The "ValidateAddInXMLTask" task failed unexpectedly.
1>C:\Program Files (x86)\MSBuild\ESRI\ESRI.ArcGIS.AddIns.11.targets(41,5): error MSB4018: System.FormatException: Input string was not in a correct format.
1>C:\Program Files (x86)\MSBuild\ESRI\ESRI.ArcGIS.AddIns.11.targets(41,5): error MSB4018:    at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)

Outcomes