我在 Jenkins 中配置 MSBuild 时遇到以下错误:
[ImageResize] $ cmd.exe /C " msbuild.exe p:Configuration=Release E:\Heena\Applications\ImageResize\vbimage\ImageResize.sln " && exit %%ERRORLEVEL%% 'msbuild.exe' is not recognized as an internal or external command, operable program or batch file. Build step 'Build a Visual Studio project or solution using MSBuild' marked build as failure Finished: FAILURE
请注意,我在设置 MSbuild 插件期间已将 MSBuild 路径设置为 msBuild.exe。我已在 jenkins 上成功部署 Visual Studio 项目,但无法使用 MSBuild 配置它。
最佳答案
在 jenkins 的 MSBuild 安装选项中,
选择 MSBuild 的路径 =
C:\Windows\Microsoft.NET\Framework64\v4.0.30319
然后转到您要构建的各自的 jenkins 项目,
从
添加构建步骤
菜单中选择使用 MSBuild 选项构建 Visual Studio 项目或解决方案
MSBuild 版本
将是您在步骤 1 和MSBuild 文件
中定义的内容在
命令行参数
选项中键入解决方案文件的路径输入
/p:Configuration=Release
。
希望您能得到您想要的答案。
关于jenkins - Jenkins 中的MSBuild配置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40079064/