Question

I am having issues understanding Cruise Control. I would like to create a build automation in order to perform the build in my project. To do that I created the following entry in the ccnet.config file

<project name="My Web Release " description="Web config">
  <workingDirectory>d:\GIT</workingDirectory>

  <triggers/>

  <sourcecontrol type="git">
    <repository>GIT REPO</repository>
    <branch>release-name</branch>
    <autoGetSource>true</autoGetSource>
    <fetchSubmodules>true</fetchSubmodules>
    <executable>C:\Program Files (x86)\Git\cmd\git.exe</executable>
    <tagOnSuccess>false</tagOnSuccess>
    <commitBuildModifications>false</commitBuildModifications>
    <commitUntrackedFiles>false</commitUntrackedFiles>
    <tagCommitMessage> Build {0}</tagCommitMessage>
    <tagNameFormat>Build-{0}</tagNameFormat>
    <committerName>Build</committerName>
    <committerEMail>build@build.com</committerEMail>
    <workingDirectory>$(workingDirectory)\Sources\WEB</workingDirectory>
    <timeout>600000</timeout>
  </sourcecontrol>

  <tasks>
    <msbuild>
      <executable>c:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe</executable>
      <buildFile>BuildScript.xml</buildFile>
      <targets>NewBuild</targets>
      <logger>C:\Program Files (x86)\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll</logger>
    </msbuild>
  </tasks>

  <publishers>
    <xmllogger />
    <artifactcleanup cleanUpMethod="KeepLastXBuilds" cleanUpValue="50" />
  </publishers>

</project>

And I do have a BuildScript.xml file. My question is: Is this a nAnt or MSBUILD script?

I am asking because I am trying to follow the documentation but I get a lot of issues regarding unknown tasks and so on.

For instance, this:

<property name="configuration" value="CLOSED" />

Would generate a unknown "property" task.

I am looking at MSBuild documentation to use a Move task.

and I got to this line:

<move file="originPath" tofile="TargetPath"/>

But I get:

BuildScript.xml(18,3): error MSB4036: The "Move" task was not found. C heck the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared w ith in the project file, or in the *.tasks files located in the "C: \Windows\Microsoft.NET\Framework\v2.0.50727" directory.

What is driving me crazy is that it was working before we migrated to Cruise Control.

Is this being interpreted as nAnt or MSBuild? Any ideas on why I am getting these errors?

Was it helpful?

Solution

It looks like your mixing nant and msbuild, if it was msbuild it would look like

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" Tools="4.0">
<Target Name="Move">
<PropertyGroup>
   <configuration>CLOSED</configuration>
</PropertyGroup>

<Move SourceFiles="Somefilefile" DestinationFolder="c:\temp"/>
</Target>
</Project>

So casing was an issue and that you need to specify the tools version as move is available from 4.0.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top