Thatcher,
How are you decorating your elements? The attributes you need are
different for attributes and elements. e.g.
This will be an attribute of the <mcc> task, and is optional.
[TaskAttribute("targetDir", Required = false)]
public bool TargetDir
{
get {...}
set {...}
}
This will be a nested elemet of the <mcc> task. This is of type FileSet,
but called mfile, so the structure of your <mfile> nested element
must follow teh rules for a FileSet element. You can use any of the
pre-defined NAnt element types here, or create your own.
[BuildElement("mfile")]
public FileSet Mfile
{
get {...}
set {...}
}
HTH,
Bill
From "Thatcher Clay" <[EMAIL PROTECTED]>@lists.sourceforge.net
Sent by: [EMAIL PROTECTED]
18/06/2007 21:50
To
<nant-users@lists.sourceforge.net>
cc
Subject
[NAnt-users] Creating custom Nant Tasks
Hello,
Is there anyone who has had experience creating custom Nant tasks? I am
trying to hook in mcc, a matlab compiler, into Nant, but I am running into
issues when I try to parse nested elements. What I want to be able to
parse looks something like this:
<mcc attributes….>
<class name=”foo”>
<mfile name=”bar.m” />
</class>
</mcc>
I can make it work just using the attributes on the top level, but when I
try to add a nested element to the task I get an error message saying that
“mcc does not support the nested build element class. Does anyone know
how to create a custom task that accepts nested elements?
Thanks,
Thatcher
----------------------------------------
This message is intended exclusively for the individual(s) or entity to
which it is addressed. It may contain information that is proprietary,
privileged or confidential or otherwise legally exempt from disclosure. If
you are not the named addressee, you are not authorized to read, print,
retain, copy or disseminate this message or any part of it. If you have
received this message in error, please notify the sender immediately by
e-mail and delete all copies of the message.
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users
IMPORTANT
The information contained in this e-mail and any attachments is intended for
the addressee only
and may contain legally privileged or confidential information. If you are not
the intended
recipient you must not use, disclose, copy, distribute, alter, or take any
action in reliance
on the information and Avon Insurance plc will not accept liability for any
loss or damage howsoever
arising, directly or indirectly in reliance on it and gives no warranty or
representation as to its
accuracy or reliability. If you are not the addressee, please notify us
immediately on 01789 202121*
and delete the material from your computer and destroy any copies.
Avon Insurance plc reserves the right to monitor and record incoming and
outgoing email messages for
the purposes of investigating or detecting unauthorised use of its system and
ensuring its effective operation.
Avon Insurance plc will not accept liability for any loss or damage as a result
of any virus being passed on.
Avon Insurance plc (No. 209606).
Registered in England. Registered Office: Arden Street, Stratford upon Avon,
Warwickshire CV37 6WA.
Authorised and regulated by the Financial Services Authority.
A member of the NFU Mutual group of companies and the Association of British
Insurers.
*For security and training purposes, telephone calls may be recorded and
monitored.
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users