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_id=5047&alloc_id=10808&op=click _______________________________________________ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to