Question

I am trying to configure CCNet to build my project.

I get the error:

Couldn't find solution file 'C:\CRUISECONTROL\BuildEngine\BuildEngine.sln'

I haven't specified that specific path so I assume it is using part of the build file path.

When I specify:

<buildArgs>-buildfile:C:\CRUISECONTROL\BuildEngine\BuildEngine.build -D:sln=C:\CRUISECONTROL\BuildEngine.sln</buildArgs>

Where it actually is, I get an error about file format which is expected.

How on earth do I specify the path to the file, at the moment I can only specify the file name.

Folder Layout:

C:\CRUISECONTROL\ **SOLUTION IS HERE**
C:\CRUISECONTROL\BuildEngine\ ** BUILD FILE IS HERE **

CCNet Config:

<tasks>
    <nant>
      <executable>C:\Program Files (x86)\NAnt\bin\NAnt.exe</executable>
      <baseDirectory>C:\CRUISECONTROL</baseDirectory>
      <buildArgs>-buildfile:C:\CRUISECONTROL\BuildEngine\BuildEngine.build -D:sln=BuildEngine.sln</buildArgs>
      <nologo>false</nologo>
      <targetList>
        <target>build</target>
      </targetList>
      <buildTimeoutSeconds>1200</buildTimeoutSeconds>
    </nant>
</tasks>

NAnt build file:

<?xml version="1.0"?>
<project name="BuildEngine" default="build" basedir=".">
  <description>Build Engine Build File</description>

  <property name="sln" value="sln.file.empty" overwrite="false" />

  <target name="clean">

  </target>

  <target name="build" depends="clean">
    <solution configuration="debug" solutionfile="${sln}" />
  </target>
</project>

Thanks.

Was it helpful?

Solution

The build file is set in its own element within the nant element. See below.

        <nant>
            <executable>c:\nantdir\nant.exe</executable>
            <buildArgs>-D:blah_prop=foobar</buildArgs>
            <nologo>false</nologo>
            <buildFile>default.build</buildFile>
            <targetList>
                <target>the-nant-target</target>
            </targetList>
            <buildTimeoutSeconds>9000</buildTimeoutSeconds>
        </nant> 

buildArgs are just properties to send to Nant. They have nothing to do with the nant file you're trying to use.

OTHER TIPS

NAnt Documentation:

<Solution>

Right now, only Microsoft Visual Studio .NET 2002 and 2003 solutions and projects are supported.

Two hours wasted.

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