Setting revision number to 0

Oct 9, 2008 at 9:05 AM
Hi All,

Will one of these extensions allow me to set assembly revision number to zero?


Oct 9, 2008 at 9:12 PM
It depends, can you provide a few more details about what you are trying to accomplish, e.g. are you incrementing any other build parts?
Oct 9, 2008 at 10:04 PM
Hi Mike,

As you know, .NET assembly version looks like 2.4.4343.678453, I was wondering if using these extensions I can change it sistematically to 2.4.4343.0 or


Oct 9, 2008 at 10:29 PM
Not really. You can use a combination of the DateAndTime and TFSVersion tasks to accomplish the second one, but it's not very pretty. The TextString task might also help, but again, not pretty. Out of interest, why would you need to do this to an existing build number?
Oct 13, 2008 at 12:03 PM
To simplify the build number.


Dec 2, 2008 at 2:48 PM
So it is possible to change the revision and/or buildnumber? Is there a way to this test locally?
Dec 5, 2008 at 9:14 PM
Sorry for the very late reply. The AssemblyInfo task that ships with might help. I will look into it this weekend. If not, I will add another versioning option to meet this requirement. Again, apologies for the late and inconclusive reply, I'm currently swamped...
Dec 18, 2008 at 9:38 AM
Where can I find more information about the assembly info task?
Dec 18, 2008 at 12:38 PM
There's whats in the Help file and sample file. What are you after specifically? I ask as it may help if I improve the documentation.

Note, the assembly info task will not help in setting the versions as you suggest above. I think I'll be implementing an additional task.


Dec 18, 2008 at 12:48 PM
Edited Dec 23, 2008 at 9:22 AM
I don't get the combination of the VersionNumber.targets file and TfsVersion's SetVersion. I understand the targets file declares properties to use, but these aren't filled from what is in the existing AssemblyInfo.cs right?
And what does the Target UpdateAssemblyInfoFiles at the end of the .targets file do? Does it write the properties to the AssemblyInfo.cs file? I tested this but nothing happened.. But if it does, what does SetVersion add? They both would be doing the same.. SetVersion appears to write the version to the assembly as expected without fiddling with the AssemblyInfo.cs file.
Can I combine both to make the versioning more dynamical?
I just read your reply, a blog post would be helpful!
Jan 14, 2009 at 9:21 PM

As mentioned in my mail, the VersionNumber.targets file and TfsVersion's SetVersion are not related. Sorry I've not had a chance to get a blog post out yet. I will try do asap. We are also about to (next few days) checkin some updates for versioning that may help too.