Hi Michael,

Do you have a small repro you can share ?

Gert 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Michael O'Brien
> Sent: dinsdag 14 maart 2006 16:19
> To: nant-developers@lists.sourceforge.net
> Subject: [nant-dev] Custom tasks from XML / using dynamic assemblies
> 
> Hi everyone,
> 
> I'm new on this list, so I hope this it's the right place to discuss
> this, but I've written a custom task that allows buildfile authors to
> define new tasks using XML (see below for details). It works well, but
> I have one problem: I generate a dynamic assembly when it executes
> which it seems has to be persisted to disk (mainly because
> TypeFactory.ScanTypeForTasks calls the Location property on my dynamic
> assembly). As such, the assembly is left over on disk when the script
> finishes executing, which is pretty ugly.
> 
> Does anyone know if there is any way to avoid this, either by managing
> to add a task from my dynamic assembly, or ensuring the assembly is
> deleted when the script finishes?
> 
> For the interested, my task works as in the following example -- the
> <customTask> element defines a new task that accepts a list of
> parameters, which are passed to the rest of the <customTask> block
> when the <logMessage> element appears. We're using it quite a bit in
> some complex scripts we have to refactor otherwise complex targets. If
> you'd like the C# source to this, just ask and I'll put it on a
> server.
> 
> thanks
> Michael
> 
> -- example follows:
> <customTask name="logMessage">
>    <parameters>
>       <parameter parameterName="msg" required="true" />
>    </parameters>
>                       
>    <echo message="${msg}"/>
> </customTask>
>               
> <logMessage msg="hi there" /> <!-- prints hi there to the console -->
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking 
> scripting language
> that extends applications into web and mobile media. Attend 
> the live webcast
> and join the prime developer group breaking into this new 
> coding territory!
> http://sel.as-us.falkag.net/sel?cmd=k&kid0944&bid$1720&dat1642
> _______________________________________________
> nant-developers mailing list
> nant-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nant-developers
> 



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
nant-developers mailing list
nant-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to