Thanks Erich, looks like a good time for a wrapper class!
 


Date: Fri, 26 Oct 2007 16:22:09 +0200From: [EMAIL PROTECTED]: [EMAIL 
PROTECTED]: [EMAIL PROTECTED]: Re: [NAnt-users] Advanced NANT question ...



Hi Alan,
 
Thought I'd mention it:
When using ExecuteAssembly(), the assembly executes within your current 
AppDomain and therefore writes to your current AppDomain's stdout/stderr. Thus 
you easily can redirect output by calling Console.SetOut() / Console.SetError().
 
-Erich


From: Alan Guedeney [mailto:[EMAIL PROTECTED]: Fri 2007-10-26 15:41To: Gert 
DriesenCc: Alan Guedeney; Erich Eichinger; [EMAIL PROTECTED]: Re: [NAnt-users] 
Advanced NANT question ...
Thanks Gert, I'll try that out.I'm sure it will help!
On 10/26/07, Gert Driesen <[EMAIL PROTECTED] > wrote: 
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=markupHope
 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 AMSubject: 
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 
orstandard 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! LOLSubject: RE: 
[NAnt-users] Advanced NANT question ...Date: Thu, 25 Oct 2007 08:14:29 
+0200From: [EMAIL PROTECTED]: [EMAIL PROTECTED]; [EMAIL PROTECTED]  
AppDomain.ExecuteAssembly ("nant.exe",Assembly.GetExecutingAssembly().Evidence, 
new string[] { "targetname" });-Erich  From: [EMAIL PROTECTED]   [mailto:[EMAIL 
PROTECTED] On Behalf Of Alan  GuedeneySent: Wednesday, October 24, 2007 4:35 
PMTo:   [EMAIL PROTECTED]: [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

Reply via email to