Thanks, Troy. Duh. It's even documented! It never even occurred to me to RTFM because there is no other case that I know of where a property has a non-global scope. While I like it, it seems contrary to the behavior of properties everywhere else in nant. I wish properties had implicit scope everywhere (as in javascript or xslt), but we've already had that discussion.
________________________________ Gary McCullough -----Original Message----- From: Troy Laurin [mailto:[EMAIL PROTECTED] Sent: Friday, September 03, 2004 7:35 AM To: McCullough, Gary Cc: [EMAIL PROTECTED] Subject: Re: [Nant-users] foreach property lost McCullough, Gary wrote: > Can anyone explain this to me? Is it a bug or a feature? This code: It's in the documentation, so I'd go feature. http://nant.sourceforge.net/help/tasks/foreach.html "The property is returned to its normal value once it is used." > Bonus question: > > Anyone know an easier way to read the contents of a one-line file into a > property? Using base NAnt functionality? None come to mind. Looping through and setting a property inside the loop is the simplest way I know... Alternatively, you could write a custom task or function that does just that... > Double bonus question: > > Anyone know a way to use the version task to read the build.number file > without updating it? Again, not using base (NAnt-contrib) functionality... you might want to suggest an 'update' attribute (default 'true'), which if set to false will just set the version number without updating the file. Regards, -T ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_idP47&alloc_id808&op=click _______________________________________________ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-users
