try 
 
  AppDomain.ExecuteAssembly("nant.exe", Assembly.GetExecutingAssembly().Evidence, new string[] { "targetname" } );
 
-Erich


From: nant-users-bounces@lists.sourceforge.net [mailto:nant-users-bounces@lists.sourceforge.net] On Behalf Of Alan Guedeney
Sent: Wednesday, October 24, 2007 4:35 PM
To: nant-users@lists.sourceforge.net
Subject: [NAnt-users] Advanced NANT question ...

I'm creating a C# console program that needs to pass in NANT's command line arguments and execute a task from a NANT buildfile.  Does anyone have a code snippet on how to do this?