Editing Project Properties for Publish Version in team build
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开发者_StackOverflow 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.
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.
My VS and TFS server is 2008.Is there any way i can edit my Publish version before build as i do in this case to edit the InstallUrl of the projecte-g
<File.RegEx Path="$(BuildDirectory)/Sources/Client/Client/Client.csproj"
RegularExpression="<InstallUrl>(.*?)</InstallUrl>"
NewValue="<InstallUrl>$(InstallUrl)</InstallUrl>" Force="true"/>
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="<ApplicationRevision>(.*?)</ApplicationRevision>"
NewValue="<ApplicationRevision>$(ApplicationRevision)</ApplicationRevision>" Force="true"/>
<File.RegEx Path="$(BuildDirectory)/Sources/Client/Client/Client.csproj"
RegularExpression="<ApplicationVersion>(.*?)</ApplicationVersion>"
NewValue="<ApplicationVersion>$(ApplicationVersion)</ApplicationVersion>" 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. Have tried application revision with *+1
, #+1
...
You should update your TFS server to TFS 2012 first. This will maintain support for VS2008 (TFS 2013 no longer supports it) and gives you access to community tools that no longer support 2008.
You will find two custom activities in the TFS Community Build Extensions that will do what you need.
- ClickOnce - this updates and configures the manifests for clickonce deployments from build
- TfsVersion - this creates and populates the versions number with the correct incrementing
No, I do not know any what to do this (except to roll you own) in TFS 2008. It is just too old to be supported by the community.
精彩评论