使用Bamboo构建.sln时,系统无法找到路径

时间:2013-03-06 10:08:48

标签: visual-studio-2010 bamboo

我正在尝试使用Bamboo附带的Visual Studio任务构建Visual Studio 2010解决方案的项目。但是一旦构建开始,它就无法找到所需的文件(参见下面的日志文件)。

当我尝试在命令行中构建项目时,它工作正常。 当我尝试使用Bamboo的'Command'任务执行此操作时,我得到的错误与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中,足以从命令行构建它。但竹子似乎没有使用PATH。

所以我能做的最好的办法就是通过批处理文件手动完成moc'ing,uic'ing和rcc'。

然而,仍然存在一般性问题,这也可能是my other issue的原因 因此,请发布您可能有关于如何告诉Bamboo找到moc / uic / rcc.exe的任何想法。

1 个答案:

答案 0 :(得分:1)

在您的任务配置中,您可以设置Bamboo应该使用的环境变量

例如:

PATH="C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\amd64"

这是我在构建bat文件中所做的事情(见下面的评论)

C:\Qt\Qt5.0.2\5.0.2\msvc2012_64\bin\qmake.exe  C:\bhome\xml-data\build-dir\...\project.pro  -r  -spec  win32-msvc2012  "CONFIG+=debug"  "CONFIG+=declarative_debug"  "CONFIG+=qml_debug"
call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\amd64\vcvars64.bat"
C:\Qt\Qt5.0.2\Tools\QtCreator\bin\jom.exe -f Makefile.Debug