views:

153

answers:

1

Hey everyone...

I have the following in a build script:

<record action="Start" autoflush="true" name="${nant.log}"/>

The name value is valid. I get the following error message:

Invalid element <record>.Unknown task or datatype.

After looking at the documentation I am not sure why this is causing an error.

Any ideas?

+2  A: 

It sounds like a configuration problem. There's discussion here on how to configure NAntContrib.

From method 2:

In order to make certain tasks available to every build file, you can copy the tasks assembly and all its dependencies to the "\bin\tasks" directory.

JeffH
Ah, my info was outdated :)
Vinko Vrsalovic
I have added \taks\net directorys to my nant\bin directory and copied the contribe dlls into it but it doesn't appear to make a difference. I would rather not have to load the assembly in each build file if I can avoid it.
Nick
Hmm. That post may be out of date. (It's from before the release of 0.85). I looked at my system and I have the NAntContrib dlls in C:\nant-05-rc3\bin\ There's also NAnt.Contrib.Tasks.xml in the same directory. Is that what you have?
JeffH
So why don't You utilize NAnt's `<loadtask>` task. Find the description on how to do this with the link JeffH provided. Works fine for us.
The Chairman
@Chairman - While <loadtask> will work, Nick's comment above: "I would rather not have to load the assembly in each build file" suggests that he would have to modify multiple build files, making <loadtask> a second-best solution.
JeffH