gpt4 book ai didi

Jenkins 无法找到 msbuild

转载 作者:行者123 更新时间:2023-12-02 18:22:25 25 4
gpt4 key购买 nike

开始使用 Jenkins 。尽可能快地学习!尝试在工具配置中设置 msbuild。我有这个:

enter image description here

然后我有一个工作设置为使用显式设置进行构建,另一个工作使用上面的 msbuild 进行构建:

enter image description here

当我运行此作业时,第一个构建有效,但第二个构建失败:

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 而在第二个构建步骤中却找不到?我需要改变什么?

更新:我也尝试过这样的:

enter image description here

并在作业配置中选择了 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

最佳答案

Jenkins 社区发现了我的错误:

Remove the double quotes surrounding the path

感谢Lionel Cabasson !!

关于 Jenkins 无法找到 msbuild,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54907441/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com