我正在尝试使用 Bamboo 附带的 Visual Studio 任务来构建我们的 Visual Studio 2010 解决方案的项目。但是一旦构建开始,它就无法找到所需的文件(请参阅下面的日志文件)。
当我尝试在命令行中构建项目时,它工作正常。但是,当我尝试使用 Bamboo 的“命令”任务执行此操作时,会遇到与 Visual Studio 任务相同的错误。
所以我收集我的文件检查得很好,问题出在 Bamboo 上。看到问题仅在 moc'ing、uic'ing 或 rcc'ing 时发生,我认为这可能是与 Qt 相关的问题。虽然所有可执行文件(moc.exe、uic.exe ...)都在我的 PATH 中,但我看不出它们是如何找不到的。
这是失败构建的日志文件:它是德语的,所以你应该知道“Das System kann den angegebenen Pfad nicht finden”。表示系统找不到指定的路径。
simple 01-Mrz-2013 13:47:32 Build TEST-TEST01-BUILD-83 started building on agent Default Agent
simple 01-Mrz-2013 13:47:32 Build working directory is C:\Users\Fujitsu\bamboo-home\xml-data\build-dir\TEST-TEST01-BUILD
simple 01-Mrz-2013 13:47:32 Executing build TEST-TEST01-BUILD-83
simple 01-Mrz-2013 13:47:32 Running pre-build action: Build Number Stamper
simple 01-Mrz-2013 13:47:32 Running pre-build action: Clover Grails PreBuild Action
simple 01-Mrz-2013 13:47:32 Running pre-build action: VCS Version Collector
simple 01-Mrz-2013 13:47:32 Running pre-build action: Repository Isolation Enabler Action
simple 01-Mrz-2013 13:47:32 Running pre-build action: Maven Settings Prebuild Action
simple 01-Mrz-2013 13:47:32 Starting task 'Build Project with IDE' of type 'com.atlassian.bamboo.plugin.dotnet:devenv'
command 01-Mrz-2013 13:47:32 Beginning to execute external process for build 'TestProject - TestPlan_01 - Build Project'\n ... running command line: \nC:\Users\Fujitsu\bamboo-home\DotNetSupport\devenvrunner.bat C:\Users\Fujitsu\bamboo-home\xml-data\build-dir\TEST-TEST01-BUILD c:\Program Files (x86)\Microsoft Visual Studio 10.0 x86 C:\Users\Fujitsu\bamboo-home\xml-data\build-dir\TEST-TEST01-JOB1\monalysis\MonAlysis\MonAlysis.sln /build Debug /project Core\n ... in: C:\Users\Fujitsu\bamboo-home\xml-data\build-dir\TEST-TEST01-BUILD\n
build 01-Mrz-2013 13:47:32 "c:\Program Files (x86)\Microsoft Visual Studio 10.0"
build 01-Mrz-2013 13:47:32
build 01-Mrz-2013 13:47:32 C:\Users\Fujitsu\bamboo-home\xml-data\build-dir\TEST-TEST01-BUILD>call "c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86
build 01-Mrz-2013 13:47:32 Setting environment for using Microsoft Visual Studio 2010 x86 tools.
build 01-Mrz-2013 13:47:35
build 01-Mrz-2013 13:47:35 Microsoft (R) Visual Studio Version 10.0.30319.1.
build 01-Mrz-2013 13:47:35 Copyright (C) Microsoft Corp. Alle Rechte vorbehalten.
build 01-Mrz-2013 13:47:35 1>------ Erstellen gestartet: Projekt: Core, Konfiguration: Debug Win32 ------
build 01-Mrz-2013 13:47:36 1>Der Buildvorgang wurde am 01.03.2013 13:47:36 gestartet.
build 01-Mrz-2013 13:47:36 1>InitializeBuildStatus:
build 01-Mrz-2013 13:47:36 1> Aktualisieren des Timestamps von "C:\Users\Fujitsu\bamboo-home\xml-data\build-dir\TEST-TEST01-JOB1\monalysis\MonAlysis\Core\GeneratedFiles\Debug\Core.unsuccessfulbuild".
build 01-Mrz-2013 13:47:36 1>CustomBuild:
build 01-Mrz-2013 13:47:36 1> Das System kann den angegebenen Pfad nicht finden.
build 01-Mrz-2013 13:47:36 1> Uic'ing Source\About.ui...
... (The same error happens for all the files, but only when Uic'ing, Moc'ing or Rcc'ing)
build 01-Mrz-2013 13:47:37 1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5): error MSB6006: "cmd.exe" wurde mit dem Code 3 beendet.
build 01-Mrz-2013 13:47:37 1>
build 01-Mrz-2013 13:47:37 1>Fehler beim Erstellen
build 01-Mrz-2013 13:47:37 1>
build 01-Mrz-2013 13:47:37 1>Verstrichene Zeit 00:00:00.57
build 01-Mrz-2013 13:47:37 ========== Erstellen: 0 erfolgreich, Fehler bei 1, 0 aktuell, 0 ?bersprungen ==========
simple 01-Mrz-2013 13:47:39 Failing task since return code was 1 while expected 0
simple 01-Mrz-2013 13:47:39 Finished task 'Build Project with IDE'
simple 01-Mrz-2013 13:47:39 Running post build plugin 'NCover Results Collector'
simple 01-Mrz-2013 13:47:39 Running post build plugin 'Clover Results Collector'
simple 01-Mrz-2013 13:47:39 Running post build plugin 'Artifact Copier'
simple 01-Mrz-2013 13:47:39 Running post build plugin 'Cleanup Build Processor'
simple 01-Mrz-2013 13:47:39 Finalising the build...
simple 01-Mrz-2013 13:47:39 Stopping timer.
simple 01-Mrz-2013 13:47:39 Build TEST-TEST01-BUILD-83 completed.
simple 01-Mrz-2013 13:47:39 Running on server: post build plugin 'NCover Results Collector'
simple 01-Mrz-2013 13:47:39 Running on server: post build plugin 'Clover Delta Calculator'
simple 01-Mrz-2013 13:47:39 Running on server: post build plugin 'Build Hanging Detection Configuration'
simple 01-Mrz-2013 13:47:39 Running on server: post build plugin 'Maven Dependencies Postprocessor'
simple 01-Mrz-2013 13:47:39 All post build plugins have finished
simple 01-Mrz-2013 13:47:39 Generating build results summary...
simple 01-Mrz-2013 13:47:39 Saving build results to disk...
simple 01-Mrz-2013 13:47:39 Indexing build results...
simple 01-Mrz-2013 13:47:39 Finished building TEST-TEST01-BUILD-83.
更新:
问题不是找不到文件,而是 Bamboo 找不到 moc.exe、uic.exe 和 rcc.exe。它们位于 PATH 中,这足以从命令行构建它。然而,Bamboo 似乎没有使用 PATH。
所以我能做的最好的就是通过批处理文件手动进行 moc'ing、uic'ing 和 rcc'ing 的解决方法。
然而,一般问题仍然存在,这也可能是我的另一个问题的原因。
因此,请发表您对如何告诉 Bamboo 在哪里找到 moc/uic/rcc.exe 的任何想法。