在团队构建中编辑项目属性以发布版本 [英] Editing Project Properties for Publish Version in team build

查看:109
本文介绍了在团队构建中编辑项目属性以发布版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我在每晚运行的TFS服务器中有一个每晚生成的文件,并且工作正常.我们还计划创建一个clickonce应用程序,该应用程序目前可以正常运行,除了发布版本(ApplicationVersion),我们希望该版本随每个内部版本自动递增,而不是手动输入.值得一提的是,我们只希望修订版本在每次构建时都增加1.例如,第一次为1.1.1.1,为下一个版本为1.1.1.2.我已经尝试解决了将近3天,因此,请任何对此方面的帮助都将深表感谢.
请注意,因为有很多信息可用于程序集版本控制,所以我对此一点都不感兴趣,我只想增加我的应用程序版本,所以请向这个方向指出.发布版本是< ApplicationVersion>的组合.和< ApplicationRevision>在我的场景中,定义如下

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"/>


但是,该值在首次运行后永远不会增加.第一次运行后,该值始终为1.9.4.1.有什么办法可以在下一次构建中增加它.我整天忙忙碌碌,但无法弄清楚,所以请任何想法...尝试过使用* + 1,#+ 1 ...
进行应用程序修订.
会非常感激的.

问候

代码块已更正.紧急情况已删除:这可能对您来说很紧急,但对我们而言并非如此.您所强调的紧迫性只是使我们认为您离开得太晚了,并希望我们为您做这件事.这使某些人烦恼,并且可能减慢响应速度. -OriginalGriff [/edit]


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]

推荐答案

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


这篇关于在团队构建中编辑项目属性以发布版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆