0
votes

Basically, I'm trying to integrate CruiseControl.NET with NAnt. I've got CC.NET set up, but I'm getting an exception when it tries to build with NAnt.

BUILD FAILED - Could not find a '*.build' file in 'C:\inetpub\MyProject\'

Okay, no big deal, I just have to create a build file. Not sure what that is, but I found one in the HelloWorld example that came with NAnt, it looks like this:

<project name="Hello World" default="run">
    <property name="basename" value="HelloWorld"/>
    <property name="debug" value="true"/>
    <target name="clean">
        <delete>
            <fileset>
                <include name="bin/${basename}-??.exe"/>
                <include name="bin/${basename}-??.pdb"/>
            </fileset>
        </delete>
    </target>

    <target name="build">
        <mkdir dir="bin" />
        <csc target="exe" output="bin/${basename}-cs.exe" debug="${debug}">
            <sources>
                <include name="${basename}.cs"/>
            </sources>
        </csc>
        <jsc target="exe" output="bin/${basename}-js.exe" debug="${debug}">
            <sources>
                <include name="${basename}.js"/>
            </sources>
        </jsc>
        <vbc target="exe" output="bin/${basename}-vb.exe" debug="${debug}">
            <sources>
                <include name="${basename}.vb"/>
            </sources>
        </vbc>
    </target>

    <target name="run" depends="build">
        <exec program="bin/${basename}-cs.exe" basedir="."/>
        <exec program="bin/${basename}-js.exe" basedir="."/>
        <exec program="bin/${basename}-vb.exe" basedir="."/>
    </target>
</project>

There's a lot more content in this file than I was expecting. I tried searching around to find out what everything meant, what was required, etc. But I couldn't find anything.

Is there just a basic and standard file that I could use? All I want to do is simply build my entire application, nothing crazy.

1

1 Answers

3
votes

Nant's tasks and attributes are described here: NAnt Help

Task Reference

Also,

This article has a template:

Plus, previous SO question: