c++jenkinscomvcbuild

Jenkins windows slave not able build COM dll using command line option


I have configure jenkins on Ubuntu, I am trying to build Windows COM object on windows slave node.

First issue i have face for MSBuild.exe : - I am able to resolve path error after installing MSBuild Plugin and setting MSbuild path in jenkins.

It is giving below error even after setting MSBuild location

" error MSB3411: Could not load the Visual C++ component "VCBuild.exe""

Please see below error statement:

Path To MSBuild.exe: C:\Windows\Microsoft.NET\Framework64\v3.5\MSBuild.exe
Executing the command cmd.exe /C " C:\Windows\Microsoft.NET\Framework64\v3.5\MSBuild.exe /t:Rebuild /p:Configuration=Release C:\Jenkins_Home\workspace\test\test.sln " && exit %%ERRORLEVEL%% from C:\Jenkins_Home\workspace\test
[test] $ cmd.exe /C " C:\Windows\Microsoft.NET\Framework64\v3.5\MSBuild.exe /t:Rebuild /p:Configuration=Release C:\Jenkins_Home\workspace\test\test.sln " && exit %%ERRORLEVEL%%
Microsoft (R) Build Engine Version 3.5.30729.5420
[Microsoft .NET Framework, Version 2.0.50727.5485]
Copyright (C) Microsoft Corporation 2007. All rights reserved.

Build started 11/30/2015 3:34:35 PM.
Project "C:\Jenkins_Home\workspace\test\test.sln" on node 0 (Rebuild target(s)).
  Building solution configuration "Release|Win32".
C:\Jenkins_Home\workspace\test\test.sln.cache(64,5): error MSB3411: Could not load the Visual C++ component "VCBuild.exe". If the component is not installed, either 1) install the Microsoft Windows SDK for Windows Server 2008 and .NET Framework 3.5, or 2) install Microsoft Visual Studio 2008. 
Done Building Project "C:\Jenkins_Home\workspace\test\test.sln" (Rebuild target(s)) -- FAIL


Same project i am able to build on windows command line, I am not able to figure out issue with jenkins.
-- Any suggestion to resolve this issue


Solution

  • I have resolve this issue by setting path in jenkins slave node configuration.

    I have taken path environment variable details by running set command on command line where i am able to build this project.

    go to http://server_name:8080/computer/win_slave_name/configure and add path as show in image

    Slave Configuration