Click here to Skip to main content
12,953,700 members (46,909 online)
Rate this:
Please Sign up or sign in to vote.
See more:

i have a nightly build in my TFS server that runs every night and is working completely fine. we plan to create a clickonce application as well which is currently working fine except the publish version (ApplicationVersion) which we want to automatically increment with each build instead of entering it manually. An important point to mention is that we only want the Revision part to be increment by 1 with each build. e.g for first time and for the next build. I have been trying to figure this out for almost 3 days now so pleaseeeee any help in this regard will be highly appreciated.
Please note as alot of information is available for assembly versioning so i am not at all interested in it, i just want my application version to increment so please do point me in this direction.The publish version is a combination of <ApplicationVersion> and <ApplicationRevision> and in my scenerio it is defined as follows


and then

<File.RegEx Path="$(BuildDirectory)/Sources/Client/Client/Client.csproj"
      NewValue="&lt;ApplicationRevision&gt;$(ApplicationRevision)&lt;/ApplicationRevision&gt;" Force="true"/>
    <File.RegEx Path="$(BuildDirectory)/Sources/Client/Client/Client.csproj"
      NewValue="&lt;ApplicationVersion&gt;$(ApplicationVersion)&lt;/ApplicationVersion&gt;" Force="true"/>

But the value is never incremented after first run. after the first run the value is always Is there any way that it should be incremented for the next Build. I have been pulling my hairs all day long but cant figure it out so pleaseee any idea... have tried application revision with *+1, #+1 ...
will be really thankful.


[edit]Code blocks corrected. Urgency deleted: It may be urgent to you, but it isn't to us. All that your stressing the urgency does is to make us think you have left it too late, and want us to do it for you. This annoys some people, and can slow a response. - OriginalGriff[/edit]
Posted 1-Apr-11 0:03am
Updated 1-Apr-11 0:07am
Dylan Morley 1-Apr-11 6:07am
I would look into this, but I'm currently helping someone else out.

Their request is 'Really Really Really Really Really urgentttz', so it outranks yours by 3 'Reallys', sorry.
chouhdary 1-Apr-11 6:24am
Thanks Dylan.. i will be waiting Really really really :)
chouhdary 3-May-11 8:08am
Dylan it has been a month of waiting now :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 6,429
CHill60 3,490
Maciej Los 3,103
ppolymorphe 2,020
Jochen Arndt 1,975

Advertise | Privacy | Mobile
Web02 | 2.8.170525.1 | Last Updated 1 Apr 2011
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100