Question

I'm configuring a CruiseControl.net server for the first time. My team already uses NAnt build scripts, so we are just pointing the server at the scripts and letting NAnt do all the work.

As you can see, it's pretty simple:

<project name="ChannelIP">
    <tasks>
        <nant>
            <executable>C:\Program Files\nant-0.86-beta1\bin\nant.exe</executable>
            <baseDirectory>D:\mypath</baseDirectory>
            <buildFile>D:\mypath\myNAnt.build</buildFile>
            <targetList>
                <target>build</target>
            </targetList>
        </nant>
    </tasks>
</project>

The problem is that when I run it under CC, I get the following error:

Function call failed. Expression: ${framework::get-framework-directory('net-3.5')}/msbuild.exe

          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Microsoft .NET Framework 3.5 (net-3.5) is not installed, or not correctly configured. Object reference not set to an instance of an object.

I do, in fact, use the ${framework::get-framework-directory('net-3.5')} variable to get the path to msbuild.exe; however, this code has never failed before. I can even RDP into the server using the user account that CC is running under and run the NAnt build file directly and it works just fine.

Why is it that this otherwise fine file fails just when CC runs it.

NOTE -CC is running on the same machine that I normally run the build scripts from

Was it helpful?

Solution

This sounds like a NAnt problem, there were some issues with it and .NET 3.5. Which version of NAnt are you using?

Also, have you seen Using 0.86 beta 1 for .NET 3.5? The guy has the same error message thrown by NAnt. The suggested solution was to use the latest nightly build.

OTHER TIPS

The CC service is probably not running under an account with appropriate permissions. Have you tried running CC using the command line (which will run as the logged on user) to see if you have the same problem?

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