Replace default Nant task by different one
I want to redefine copy task from Nant without changing my .build configuration files. Is it possible in nant?
Msbuild has:
<UsingTask TaskName="SGen" AssemblyFile="Tools\Extensions.dll"/>
which can do that.
I wrote my co开发者_运维百科py task by don't know how to override it globally during nant script execution.
I'm not aware of anything like that in nant. Nant can call other nant scripts via the nant task. You could write a little nant build file with your different copy methods in it and call out to it whenever you want to do a copy. Use a property and the if
and unless
attributes to select which copy implementation you want.
精彩评论