AnsweredAssumed Answered

build Add-ins From msbuild command-line

Question asked by LokionNitrox on Nov 29, 2011
Latest reply on Mar 15, 2017 by g3martin
I am in the process of putting together a CI Server application (Jenkins) that is currently building my SOA application.  I would like to add a desktop add-in that I am also working on to this server, however in order for that to happen I need to be able to build with msbuild.exe.  When I try and compile my add-in project with msbuild I receive the following error (more specifically, the following comes from Jenkins, but it's the same error locally):

Started by user anonymous
Updating http://subversion-repo/EngineeringServices/DesktopGISUtilities/DOTNET/WaterEditorExtension
At revision 1241
no change for http://subversion-repo/EngineeringServices/DesktopGISUtilities/DOTNET/WaterEditorExtension since the previous build
Path To MSBuild.exe: C:\Windows\Microsoft.NET\Framework\v3.5\msbuild.exe
Executing command: cmd.exe /C C:\Windows\Microsoft.NET\Framework\v3.5\msbuild.exe c:\workspace\dotnet\watereditor10\watereditorextension.csproj && exit %%ERRORLEVEL%%
[workspace] $ cmd.exe /C C:\Windows\Microsoft.NET\Framework\v3.5\msbuild.exe c:\workspace\dotnet\watereditor10\watereditorextension.csproj && exit %%ERRORLEVEL%%
Microsoft (R) Build Engine Version 3.5.30729.1
[Microsoft .NET Framework, Version 2.0.50727.3623]
Copyright (C) Microsoft Corporation 2007. All rights reserved.

Build started 11/29/2011 11:20:08 AM.
Project "c:\workspace\dotnet\watereditor10\watereditorextension.csproj" on node 0 (default targets).
Project file contains ToolsVersion="4.0", which is not supported by this version of MSBuild. Treating the project as if it had ToolsVersion="3.5".
C:\Program Files (x86)\MSBuild\ESRI\ESRI.ArcGIS.AddIns.targets(36,5): error MSB4062: The "ValidateAddInXMLTask" task could not be loaded from the assembly ESRI.ArcGIS.AddIns.SDK, Version=10.0.0.0, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86. Could not load file or assembly 'Microsoft.VisualStudio.Shell.9.0, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, and that the assembly and all its dependencies are available.
Done Building Project "c:\workspace\dotnet\watereditor10\watereditorextension.csproj" (default targets) -- FAILED.

Build FAILED.

"c:\workspace\dotnet\watereditor10\watereditorextension.csproj" (default target) (1) ->
(PrePackageArcGISAddIn target) ->
  C:\Program Files (x86)\MSBuild\ESRI\ESRI.ArcGIS.AddIns.targets(36,5): error MSB4062: The "ValidateAddInXMLTask" task could not be loaded from the assembly ESRI.ArcGIS.AddIns.SDK, Version=10.0.0.0, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86. Could not load file or assembly 'Microsoft.VisualStudio.Shell.9.0, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, and that the assembly and all its dependencies are available.

    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:00.68
Build step 'Build a Visual Studio project or solution using MSBuild.' marked build as failure
Finished: FAILURE

Outcomes