views:

368

answers:

2

HI, I have set up CruiseControl for .NET with SVN as my source control and using NAnt build script. When i manually build the visual studio solution i get the errors, which is correct coz i have some bad code. After i checked in the code to svn, CCNet triggered the build, but the result shows as SUCCESS. Please find the config and build files below:

NAnt build file:

<project name="MyServiceClient" default="build">
  <target name="init" depends="clean" />
  <target name="clean" />
  <target name="checkout"/>
  <target name="compile"/>
  <!--<target name="deploy"/>
  <target name="test"/>
  <target name="inspect"/>-->
  <target name="build" depends="init, checkout">
    <call target="compile" />
<!--    <call target="inspect" />
    <call target="test" />
    <call target="deploy" />-->
  </target>
</project>

ccnet.config

<cruisecontrol>

  <project name="MyServiceClient">
<sourcecontrol type="svn">
  <trunkUrl>https://dev-wks28.dev.va.root:8443/svn/test/trunk/MyServiceClient&lt;/trunkUrl&gt;
  <executable>C:/Program Files/VisualSVN Server/bin/svn.exe</executable>
  <workingDirectory>C:\test\MyServiceClient</workingDirectory>
  <username>kpedda</username>
  <password>Password1</password>
  <autoGetSource>true</autoGetSource>
</sourcecontrol>
<workingDirectory>C:\test\MyServiceClient</workingDirectory>
<triggers>
  <intervalTrigger seconds="90" buildCondition="IfModificationExists" />
  <scheduleTrigger time="10:00" buildCondition="ForceBuild" />
</triggers>
<tasks>
  <nant>
    <executable>C:/Program Files/NAnt/bin/nant.exe</executable>
    <baseDirectory>C:/Apps</baseDirectory>
    <!--<workingDirectory>C:/test/MyServiceClient</workingDirectory>-->
    <!--<projectFile>MyServiceClient.sln</projectFile>-->
    <buildFile>default.build</buildFile>
    <targetList>
      <target>build</target>
    </targetList>
  </nant>
</tasks>
<publishers>
  <xmllogger/>
</publishers>

Can any please help me in this regard...

Thanks in advance. KP

A: 

Your NANT pasted again:

<?xml version="1.0"?>
<project name="MyServiceClient" default="build">
    <target name="init" depends="clean" /> <target name="clean" />
    <target name="checkout"/>
    <target name="compile"/>
    <!--<target name="deploy"/> <target name="test"/> <target name="inspect"/>-->
    <target name="build" depends="init, checkout">
         <call target="compile" />
         <!-- <call target="inspect" /> <call target="test" /> <call target="deploy" />-->
    </target>
</project>

This script does nothing. NANT does not even look at your sourcecode with this script.

Evan Larkin
A: 

Evan, can you please correct me what i am doing wrong in this NAnt script?

Kiran
You should post this as a comment to his answer instead, not as a new answer. If you post it as a comment ("add comment" link) he will get notified of it, else he might never see your response.
sth
It's just that the compile directive is empty. I can only assume that you did not remove the body of the directive due to your inclusion of other commented out directives.
Evan Larkin