ERROR
Building an add-in project using the MSBUILD command line causes error MSB4036: The "ValidateAddInXMLTask" task was not found. The error message similar to the following is returned:
"Project "C:\MSBuildTest\ArcMapAddin1\ArcMapAddin1\ArcMapAddin1.vbproj" on node 1 (default targets).
C:\Program Files (x86)\MSBuild\ESRI\ESRI.ArcGIS.AddIns.targets(42,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\12.0\bin" directory.
[C:\MSBuildTest\ArcMapAddin1\ArcMapAddin1\ArcMapAddin1.vbproj]
Done Building Project "C:\MSBuildTest\ArcMapAddin1\ArcMapAddin1\ArcMapAddin1.vbproj" (default targets) -- FAILED."
This can occur when building an add-in using the wrong version of MSBUILD.exe.
The ArcObjects SDK 10.4 for .NET is supported on Visual Studio 2013 or Visual Studio 2015, consequently the MSBUILD program for those versions of Visual Studio has to be used for any command line build. Because there can be multiple versions of the MSBUILD executable available, it is possible to run a MSBUILD executable that is not associated with a supported Visual Studio version. Trying to build an add-in project with the wrong MSBUILD executable causes this error.
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\MSBuild\
C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe
Note:
The command must be run from a Visual Studio 2013 developer command prompt:
Code:
>"C:\Program Files (x86)\MSBuild\12.0\bin\msbuild" ArcMapAddin1.vbproj
Get help from ArcGIS experts
Download the Esri Support App