Jenkins入门。我会尽快学习!尝试在工具配置中设置msbuild。我有这个:
然后我设置了一个工作,以使用显式设置进行构建,并使用上面的msbuild进行构建:
当我运行此作业时,第一个构建成功,但第二个失败:
D:\var\lib\jenkins\workspace\VisionTest>"c:\program files (x86)\msbuild\14.0\bin\msbuild.exe" TBSM.Vision.Database\TBSM.Vision.Database\TBSM.Vision.Database.sqlproj
Microsoft (R) Build Engine version 14.0.25420.1
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 2/27/2019 9:05:25 AM.
Project "D:\var\lib\jenkins\workspace\VisionTest\TBSM.Vision.Database\TBSM.Vision.Database\TBSM.Vision.Database.sqlproj" on node 1 (default targets).
GenerateSqlTargetFrameworkMoniker:
Skipping target "GenerateSqlTargetFrameworkMoniker" because all output files are up-to-date with respect to the input files.
CoreCompile:
Skipping target "CoreCompile" because all output files are up-to-date with respect to the input files.
SqlBuild:
Skipping target "SqlBuild" because all output files are up-to-date with respect to the input files.
CopyFilesToOutputDirectory:
TBSM.Vision.Database -> D:\var\lib\jenkins\workspace\VisionTest\TBSM.Vision.Database\TBSM.Vision.Database\bin\Debug\TBSM.Vision.Database.dll
SqlPrepareForRun:
TBSM.Vision.Database -> D:\var\lib\jenkins\workspace\VisionTest\TBSM.Vision.Database\TBSM.Vision.Database\bin\Debug\TBSM.Vision.Database.dacpac
Done Building Project "D:\var\lib\jenkins\workspace\VisionTest\TBSM.Vision.Database\TBSM.Vision.Database\TBSM.Vision.Database.sqlproj" (default targets).
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:04.35
D:\var\lib\jenkins\workspace\VisionTest>exit 0
FATAL: "c:\program files (x86)\msbuild\14.0\bin\msbuild.exe" doesn't exist
Build step 'Build a Visual Studio project or solution using MSBuild' marked build as failure
Finished: FAILURE
我认为只是我是菜鸟。为什么Jenkins在第一个构建步骤中找到msbuild.exe但在第二个构建步骤中找不到?我需要更改什么?
更新:我也这样尝试过:
并在作业配置中选择了MSBuildAgent,但我仍然得到:
FATAL: "c:\program files (x86)\msbuild\14.0\bin\" doesn't exist
Build step 'Build a Visual Studio project or solution using MSBuild' marked build as failure
Finished: FAILURE
答案 0 :(得分:3)
答案 1 :(得分:0)