简体   繁体   English

TFS构建中的自动版本控制

[英]Automatic Versioning in TFS Build

I am not sure whether i can the problem good explaning. 我不确定我是否可以很好地解释这个问题。 Well we use TFS for our building. 好吧,我们在建筑中使用TFS。 And in our VS solution, there is also an installshield setup project. 在我们的VS解决方案中,还有一个installshield安装项目。

Well, sometimes our team members forget the increase products' versions that why we want to give the version number automatically generated like 3.7.1.* so when we build the project, the version of our product dll/exe will be 3.7.1.5655 好吧,有时我们的团队成员忘记了增加产品的版本,这就是为什么我们要给自动生成的版本号(例如3.7.1。*)的原因,所以当我们构建项目时,我们的产品dll / exe的版本将是3.7.1.5655

and let say we've created the following versions 并说我们已经创建了以下版本

3.7.1.1234
3.7.1.5678
3.7.1.9134

and we gave the product Version 3.7.1.5678 to our customer. 我们将产品3.7.1.5678版本提供给了客户。 And after a while, the customer said that there is a bug in this version and the version number is 3.7.1.5678. 一段时间后,客户说该版本存在错误,版本号为3.7.1.5678。

So, as I said earlier, we made the version number format like 3.7.1.* and we commit always like that so the assemblyinfo.cs file will not be changed. 因此,正如我之前所说,我们将版本号格式设置为3.7.1。*,并且我们始终像这样进行提交,因此assemblyinfo.cs文件不会更改。 and when the customer said that the version 3.7.1.5678 has problem. 当客户说3.7.1.5678版本有问题时。 how can we find the related version what the customer has, in tfs commit. 我们如何在tfs commit中找到客户拥有的相关版本。 Let say we committed several time in the same day and we cannot see (or i dont know it) where the version number 3.7.1.5678 has been stored. 假设我们在同一天提交了几次,但我们看不到(或我不知道)版本号3.7.1.5678的存储位置。

Well, I need to find the realted commit and work on this time project but i dont cannot know which commit it was. 好吧,我需要找到实际的提交并在这个时间项目上工作,但是我不知道它是哪个提交。

My question is that how you solve this problem? 我的问题是您如何解决这个问题?

I hope i could explain it. 我希望我能解释一下。

We have TFS Version 16.122.26918.3 and we use mostly Visual Studio 2017 我们拥有TFS版本16.122.26918.3,我们主要使用Visual Studio 2017

You could find the corresponding build of version number which is 3.7.1.5678. 您可以找到对应的版本号3.7.1.5678。

For a particular build, it's easy to get related changeset/commit. 对于特定的构建,很容易获得相关的变更集/提交。

Then you could pull down that changeset/commit from TFS to your local workspace, and work on the bugs. 然后,您可以将该更改集/提交从TFS下拉到本地工作区,并处理错误。

Not sure what your build number looks like, it's better to make a part of build number the same as the last version number(5678), like the usage of $(BuildID). 不确定内部版本号是什么样,最好使内部版本号的一部分与上一个版本号(5678)相同,例如使用$(BuildID)。

$(BuildID) is an internal immutable ID. $(BuildID)是内部不变的ID。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM