Search code examples
c#.nettfsversion-controltfvc

Build tagging: version increment commit vs. version control labeling


As far as I know there are two ways to tag a build:

  1. increment AssemblyInfo.cs version and commit the change
  2. add a version control label

What are pros and cons of these two approaches?

Thanks.


Solution

  • I would prefer to use "Label" since it is more easy to achieve. TFS already supports to label the source code after the build and when you want to get that specific version, you just need to use the label directly. But with assembly version, you need to do more things to increase the version and check in the change. And you need to find the id for that changeset first and then get that version when you want to get it. And also, "label" does not affect the history of source code while "assembly version" will create lots of history if the version increments frequently.