0
我有一個名爲MySolution.sln的VS2008解決方案文件,其中包含三個項目ProjectName1,ProjectName2,ProjectName3和ProjectName4。我正在使用jenkins來構建解決方案(僅構建ProjectName1/2/3而不是ProjectName4)。以下是已提供給jenkins的批次。[Jenkins]使用devenv.com構建C++解決方案文件
問題是每當我們說聲明「%VSDIR%\ devenv.com」「MySolution.sln」/ Build「Release | x64」/ Project ProjectName1無法構建特定項目我的%errorlevel%未更新到非負整數(> 0)。無論通過/失敗%ERRORLEVEL%始終爲「0」
詹金斯方式調用這是
cmd /c call C:\Users\John\AppData\Local\Temp\hudson343434346343.bat
在這個任何想法?
批處理腳本:
@ECHO OFF
set VSDIR=C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE
"%VSDIR%\devenv.com" "MySolution.sln" /Clean "Release|x64"
"%VSDIR%\devenv.com" "MySolution.sln" /Build "Release|x64" /Project ProjectName1
IF %ERRORLEVEL% EQU 0 (
"%VSDIR%\devenv.com" "MySolution.sln" /Build "Release|x64" /Project ProjectName2
IF %ERRORLEVEL% EQU 0 (
"%VSDIR%\devenv.com" "MySolution.sln" /Build "Release|x64" /Project ProjectName3
IF %ERRORLEVEL% EQU 0 (
) ELSE (
echo "Failed to build ProjectName3"
)
) ELSE (
echo "Failed to build ProjectName2"
)
) ELSE (
echo "Failed to build ProjectName1"
)
unset VSDIR