The way to get around that is to build the logic in to your Nant file, so it
only calls the version task when you want the version number to be
incremented.

For example, if you have a solution of many projects, and only want to
increment the version number if a project has to be recompiled, so you don't
increment ALL the projects' version when only one project's source has been
modified.  What you can do is use the uptodate task to check if your source
files are newer then files in the obj directry, if so, call the version
task, otherwise the version task will not be called.  When the version task
is not called you can use the loadfile task to read the current version
number, so it can be injected into the AssemblyInfo.* file if you like.


Aaron Feng

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Bruce
Kinchin
Sent: Sunday, May 08, 2005 8:48 PM
To: nant-users@lists.sourceforge.net
Subject: [Nant-users] Version


I need to get the version number from a txt file _without_ incrementing
it. (i.e. without altering the version number).

The "version" task is excellent, except that I cannot get it to leave
the version number "as-is". It either increments the BuildNumber or the
RevisionNumber. You can specify 'NoIncrement' for the build number, but
not for the RevisionNumber.

Has anybody got a better suggestion or an alternative ??

Thanks,
Bruce.


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r
_______________________________________________
Nant-users mailing list
Nant-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users



-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click
_______________________________________________
Nant-users mailing list
Nant-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to