Alan, You can write all command line arguments to a response file, and pass this response file to NAnt using the @<file name> option.
To redirect stdout and stderr, you need to use the Process class. For an example on how to do this, look at the source of NAnt's ExternalProgramBase.cs: http://nant.cvs.sourceforge.net/nant/nant/src/NAnt.Core/Tasks/ExternalProgramBase.cs?revision=1.71&view=markup Hope this helps, Gert ----- Original Message ----- From: "Alan Guedeney" <[EMAIL PROTECTED]> To: "Erich Eichinger" <[EMAIL PROTECTED]>; <nant-users@lists.sourceforge.net> Sent: Friday, October 26, 2007 4:05 AM Subject: Re: [NAnt-users] Advanced NANT question ... Ok, I get a PathTooLongException. Another limitation of using it this way is that the max path size is something ridiculous like 260 characters, where as the system max path size is much larger! On top of that, I do not see a way to retrieve the standard out or standard error from the program. What a pain! These Microsoft .NET made this much too complicated un-necessarily. They really don't believe in simplification. I guess that goes against job-security! LOL Subject: RE: [NAnt-users] Advanced NANT question ... Date: Thu, 25 Oct 2007 08:14:29 +0200 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED]; nant-users@lists.sourceforge.net try AppDomain.ExecuteAssembly("nant.exe", Assembly.GetExecutingAssembly().Evidence, new string[] { "targetname" } ); -Erich From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 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? -------------------------------------------------------------------------------- > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ -------------------------------------------------------------------------------- > _______________________________________________ > NAnt-users mailing list > NAnt-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nant-users > ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ NAnt-users mailing list NAnt-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users