我正试图在CruiseControl.NET版本1.3.0.2918中使用相当直接的任务:
c:\depot\AppBuilder\1.0\
但是,当项目运行时,它在构建日志中失败并显示以下信息:
MSBUILD:错误MSB1008:只能指定一个项目.开关:1.0
对于切换语法,键入"MSBuild/help"
当我查看ccnet.log文件时,我发现:
使用参数[/ nologo"/ p:CCNetArtifactDirectory = C:\ Program]在工作目录[c:\ depot\AppBuilder\1.0]中启动进程[C:\ WINDOWS\Microsoft.NET\Framework\v2.0.50727\MSBuild.exe] Files\CruiseControl.NET\server\AppBuilder 1.0(Debug)\ Artifacts; CCNetBuildCondition = ForceBuild; CCNetBuildDate = 2009-01-22; CCNetBuildTime = 09:25:55; CCNetIntegrationStatus = Unknown; CCNetLabel = 3; CCNetLastIntegrationStatus =失败; CCNetNumericLabel = 3; CCNetProject = AppBuilder 1.0(调试); CCNetProjectUrl = http:// CISERVER01/ccnet; CCNetRequestSource = jstong ; CCNetWorkingDirectory = c:\ depot\AppBuilder\1.0 \""/ l:ThoughtWorks.CruiseControl.MsBuild.XmlLogger,ThoughtWorks. CruiseControl.MsBuild.dll; C:\ Program Files\CruiseControl.NET\server\AppBuilder 1.0(Debug)\ Artifacts\msbuild-results.xml"]
我从中推断msbuild是在正确的工作目录中运行的,并且传递给它的命令行是:
/ nologo"/ p:CCNetArtifactDirectory = C:\ Program Files\CruiseControl.NET\server\AppBuilder 1.0(Debug)\ Artifacts; CCNetBuildCondition = ForceBuild; CCNetBuildDate = 2009-01-22; CCNetBuildTime = 09:25:55; CCNetIntegrationStatus =未知; CCNetLabel = 3; CCNetLastIntegrationStatus =失败; CCNetNumericLabel = 3; CCNetProject = AppBuilder 1.0(调试); CCNetProjectUrl = http:// CISERVER01/ccnet; CCNetRequestSource = jstong ; CCNetWorkingDirectory = c:\ depot\AppBuilder\1.0 \""/ l:ThoughtWorks.CruiseControl.MsBuild.XmlLogger,ThoughtWorks.CruiseControl.MsBuild.dll; C:\ Program Files\CruiseControl.NET\server\AppBuilder 1.0(Debug)\ Artifacts\msbuild-results.xml"
如果我在命令行手动运行,我会得到一个类似的错误.
在我看来,没有将正确的命令行传递给MSBuild可执行文件.
你能发现我的错误吗?或者这个版本的CruiseControl.NET(1.3.0.2918)是否与任务有关?
我想也许它是工件目录路径中的空间.MSBuild确实不喜欢空格,因为它认为它是参数之间的中断.你可以尝试从该路径中删除空间,看看会发生什么?