Click here to Skip to main content
15,884,298 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hello,

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 1.1.1.1 for first time and 1.1.1.2 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

<ApplicationRevision>1</ApplicationRevision>
<ApplicationVersion>1.9.4.%2a</ApplicationVersion>

and then

<File.RegEx Path="$(BuildDirectory)/Sources/Client/Client/Client.csproj"
      RegularExpression="&lt;ApplicationRevision&gt;(.*?)&lt;/ApplicationRevision&gt;"
      NewValue="&lt;ApplicationRevision&gt;$(ApplicationRevision)&lt;/ApplicationRevision&gt;" Force="true"/>
    <File.RegEx Path="$(BuildDirectory)/Sources/Client/Client/Client.csproj"
      RegularExpression="&lt;ApplicationVersion&gt;(.*?)&lt;/ApplicationVersion&gt;"
      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 1.9.4.1. 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.

Regards

[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
Updated 1-Apr-11 0:07am
v2
Comments
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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900