0

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 errors, which is correct because I have some bad code. After I checked in the code to svn, CCNet triggered the build, but the result shows as SUCCESS. Please see 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</trunkUrl>
  <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 anybody please tell me what's going on?

sth
  • 222,467
  • 53
  • 283
  • 367
  • what does default.build look like? – fnCzar Jun 18 '09 at 19:28
  • If you paste in the NAnt build file, it may help out. – Jab Jun 18 '09 at 19:28
  • Here is the build file **NAnt build file:** –  Jun 18 '09 at 19:31
  • Can you confirm that you have checked in the bad code and not some other files? If the erroneous code has not been committed then this is the expected behavior. – Mark Roddy Jun 18 '09 at 19:40
  • Yes, i have committed the changes through the tortoise shell. i tried couple of times by changing and commiting –  Jun 18 '09 at 19:46
  • Have you tried calling nant build from the command line on your local machine - does it pass or fail? – James Allen Jun 19 '09 at 09:49
  • i tried executing the command line nant. it also succeeds. but the code in the source control should not and does not build in Visual studio. OK i got one doubt just now,May i know what the workingDirectory tag in the config file mean? Is it the place where the code is checked out and modified. If it is right, then i am in the right path but unable o get it work. –  Jun 19 '09 at 18:03

1 Answers1

1

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
  • 377
  • 2
  • 6
  • 16
  • Evan, can you please correct me what i am doing wrong in this NAnt script? – Kiran Feb 03 '11 at 22:52
  • 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 Feb 03 '11 at 22:52