Ian,
  Thanks for the quick reply.  I'm using a CVS version from 4/1/2004 [NAnt
0.85 (Build 0.85.1552.0; net-1.1.win32; nightly; 4/1/2004)]

  I just got the current copy from CVS and tried to build it, however I got
an error during the build.

  The command I used was "bin\nant package" and the error was in
"NAnt.Console.build test".  Here is the error message:

-----------------------------------
[nant] C:\src\nantcvs\nant\tests\NAnt.Console\NAnt.Console.build test
Buildfile: file:///C:/src/nantcvs/nant/tests/NAnt.Console/NAnt.Console.build
Target(s) specified: test
build:
test:
[nunit2] Unknown argument '-asdf'
[nunit2] Tests run: 9, Failures: 1, Not run: 0, Time: 3.0765687 seconds
-------------------------------------

  Is there a tagged version or a date that you recomend I pull from to build
and test against?

Thanks,

John Cole

-----Original Message-----
From: Ian MacLean [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 11, 2004 2:11 AM
To: John Cole
Cc: '[EMAIL PROTECTED]'
Subject: Re: [nant-dev] custom function example does not work...


Hi John,
What build are you running and which version of the docs are you using ? 
With a current nightly build the example at 
http://nant.sourceforge.net/nightly/help/tasks/script.html
works just fine. What error are you getting when you try it ?

btw the example you posed is fine but using a nested class is now 
unnecessary. Here is the complete build fiule I tested with using the 
sample from the docs :

<?xml version="1.0" ?>
<project name="test" default="test"> 
    <script language="C#" prefix="test" >
        <code><![CDATA[                
   
            [Function("test-func")]
            public static string Testfunc(  ) {
                    return "some result !!!!!!!!";
            }
    ]]></code>
    </script>
    <echo message='${test::test-func()}'/>

    <target name="test">
    </target>
</project>

Ian

John Cole wrote:

>Hello,
>  This appears to be a documenation problem, but the exampe for a custom
>function using the script task will not work.
> 
>  I was able to find an example that does work in the mailing list
> 
><target name="testscript">
> <script language="C#">
>  <code><![CDATA[
>   public static void ScriptMain(Project project) 
>   {
>   
>   }
> 
>   [FunctionSet("test", "Test")]
>   public class TestFunctions : FunctionSetBase 
>   {
>     public TestFunctions(Project project, PropertyDictionary propDict) :
>base(project, propDict) 
>    {
>    
>    }
>  
>    [Function("test-func")]
>    public static string Testfunc(  ) 
>    {
>     return "some result !!!!!!!!";
>    }
>   }
>  ]]></code>
> </script>
> <echo message="${test::test-func()}" />
> </target>
> 
>Thanks,
> 
>John Cole
> 
>
>-------------------------------------
>This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the system manager.
This message contains confidential information and is intended only for the
individual named. If you are not the named addressee you should not
disseminate, distribute or copy this e-mail.
>
>  
>


-- 
Ian MacLean, Developer, 
ActiveState, a division of Sophos
http://www.ActiveState.com

-------------------------------------
This email and any files transmitted with it are confidential and intended solely for 
the use of the individual or entity to whom they are addressed. If you have received 
this email in error please notify the system manager. This message contains 
confidential information and is intended only for the individual named. If you are not 
the named addressee you should not disseminate, distribute or copy this e-mail.


-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to