CruiseControl.NET + MSBuild

MSBuild タスクの使い方メモ

参考URL

タスクの説明はこのあたりを参考に。

タスクを使うのに必要なDLLはここからダウンロード。

CruiseControl.NET 設定ファイル

  • 上記でダウンロードした ThoughtWorks.CruiseControl.MSBuild.dll は msbuild タグの workingDirectory タグで指定した場所に置く事。
  • msbuild タグの executable タグを省略すると C:\WINDOWS\Microsoft.NET\Framework\v2.0.50215\MSBuild.exe (beta2 か?) を使うので、2.0.50727の MSBuild を使うように指定する事。
ccnet.config

<cruisecontrol>
  <project name="CcnetTest" webURL="http://localhost/ccnet" publishExceptions="true">
    <workingDirectory>c:\ccnet\work</workingDirectory>
    <artifactDirectory>c:\ccnet</artifactDirectory>
    <tasks>
      <msbuild>
        <executable>C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\MSBuild.exe</executable>
        <workingDirectory>c:\ccnet</workingDirectory>
        <projectFile>work/Test.sln</projectFile>
        <buildArgs>/t:Rebuild /p:Configuration=Release</buildArgs>
        <timeout>60</timeout>
      </msbuild>
    </tasks>
    <publishers>
      <xmllogger logDir="log" />
    </publishers>
  </project>
</cruisecontrol>