使用msbuild任务进行项目后,CruiseControl.Net重新启动

时间:2014-08-26 14:37:26

标签: msbuild cruisecontrol.net

我正在尝试设置一个相当简单的CruiseControl.NET构建服务器,我看到使用MSBuild的项目有奇怪的行为。每次运行项目的构建并执行msbuild时(通过强制或通过源代码控制的更改),构建成功完成,但CCNet也会重新启动。我注意到这一点,因为所有项目的“下一个构建时间”都被提前移动到当前时间+ initialSeconds。

无论我是将CCNet作为服务器还是通过命令行可执行文件运行,都会出现此行为。 在命令行上运行时,调试输出不会给我任何有用的东西 - 它只是立即从项目构建的最后一行跳转到'startup'输出。

其他信息:

  • TFS是源控制服务器
  • 我的构建仅访问工作目录
  • 我的发布只是从工作目录复制到工件目录
  • 如果我注释掉msbuild任务,则运行项目构建不会重新启动CruiseControl
  • 在构建期间未访问或更新CruiseControl的服务器或状态目录
  • 当发生这种情况并且我作为服务运行时,在事件查看器中没有任何用处。 CCService不会报告停止/启动 - 就像巡航控制在内部重新启动一样。

这是msbuild配置: <tasks> <msbuild> <executable>C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe</executable> <workingDirectory>$[$CCNetWorkingDirectory]\$(PathToSolution)</workingDirectory> <projectFile>$(SolutionFile)</projectFile> <buildArgs>/p:Configuration=Release /v:d</buildArgs> <timeout>900</timeout> </msbuild> </tasks>

最后,这是msbuild进程/服务器重启结束时的跟踪日志。

Done building target "Build" in project "MYAPP.sln".
Done Building Project "C:\CCNet\WD\NET\Main\MYAPP\MYAPP.sln" (default targets).     

Build succeeded.
    0 Warning(s)
    0 Error(s) 

Time Elapsed 00:00:05.35    

2014-08-26 20:11:41,881 [NET.App.MYAPP] [INFO] - Delete merged file 'C:\CCNet\BuildArtifacts\NET.App.MYAPP\msbuild-results-dcf002da-d0d0-4d0a-8b86-fb25adaf1ac3.xml'.
2014-08-26 20:11:46,478 [NET.App.MYAPP] [INFO] - Integration complete: Success - 8/26/2014 8:11:41 PM
2014-08-26 20:11:46,579 [NET.App.MYAPP] [INFO] - Integrator for project: NET.App.MYAPP is now stopped.
2014-08-26 20:11:57,444 [257] [INFO] - CruiseControl.NET Server 1.8.5.0 -- .NET Continuous Integration Server
2014-08-26 20:11:57,465 [257] [INFO] - Copyright © 2003 - 2014 ThoughtWorks Inc.  All Rights Reserved.
2014-08-26 20:11:57,466 [257] [INFO] - .NET Runtime Version: 2.0.50727.5477     Image Runtime Version: v2.0.50727
2014-08-26 20:11:57,467 [257] [INFO] - OS Version: Microsoft Windows NT 6.1.7601  Service Pack 1           Server locale: English (United States)
2014-08-26 20:11:57,467 [257] [INFO] - Reason: File change delay finished
2014-08-26 20:11:57,944 [CCNet Server] [INFO] - Reading configuration file "C:\CCNet\Server\ccnet.config"
2014-08-26 20:11:58,347 [CCNet Server] [WARN] - Configuration does not have any version information - assuming the configuration is for version 1.8
2014-08-26 20:11:58,800 [CCNet Server] [INFO] - Log cache time set to 5 minutes
2014-08-26 20:11:58,990 [CCNet Server] [INFO] - Registered channel: tcp
2014-08-26 20:11:58,991 [CCNet Server] [INFO] - CruiseManager: Listening on url: tcp://32.32.29.129:21234/CruiseManager.rem
2014-08-26 20:11:58,992 [CCNet Server] [INFO] - Registered channel: tcp
2014-08-26 20:11:58,993 [CCNet Server] [INFO] - CruiseServerClient: Listening on url: tcp://32.32.29.129:21234/CruiseServerClient.rem
2014-08-26 20:11:58,994 [CCNet Server] [INFO] - Starting CruiseControl.NET Server

1 个答案:

答案 0 :(得分:0)

看起来ccnet注意到对应用程序目录中的.dll文件的更改,并重新启动以同化更改。

Ccnet正在寻找对任何 .dll文件的更改,因此,如果您的构建版本至少输出一个该目录,则会导致重新启动。