Jenkins windows slave无法使用命令行选项构建COM dll

时间:2015-11-30 11:23:54

标签: c++ jenkins com vcbuild

我在Ubuntu上配置了jenkins,我正在尝试在windows slave节点上构建Windows COM对象。

第一个问题我面对MSBuild.exe: - 我能够在安装MSBuild Plugin并在jenkins中设置MSbuild路径后解决路径错误。

即使在设置MSBuild位置

后,它也会给出以下误差
  

"错误MSB3411:无法加载Visual C ++组件" VCBuild.exe""

请参阅以下错误声明:

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


同样的项目我能够在Windows命令行上构建,我无法弄清楚jenkins的问题。
- 任何解决此问题的建议

1 个答案:

答案 0 :(得分:0)

我已通过在jenkins slave节点配置中设置path来解决此问题。

我通过在命令行运行path命令来获取set环境变量详细信息,我可以在这里构建此项目。

转到http://server_name:8080/computer/win_slave_name/configure并添加路径,如图所示

Slave Configuration