Version Number in Assembly, GIT and TFService

Until now we used version numbers like 2.4.1 for our VB.NET products. We set them manualy.

Now we start to use GIT with Team Foundation Service and want to improve the version number handling. The aim is simple: The format should be Major.Minor.Build.Revision. With Revision automatically inscreasing for each compile. The Build should increase for each Team Foundation Server compile (after a git push we let TFS create a continuous build). Major and Minor should only increase manually.

  • App.config only for my developer machine
  • Visual Studo: Cant build/rebuild/clean after git merge
  • Best practice to share common libraries between solutions in .NET
  • Jenkins on Windows and GUI Tests without RDC
  • Version Numbers float, decimal or double
  • Visual Studio 2008 source control for small teams
  • The version number should be visible in three places: (1.) As assembly version in the application. (2.) In the GIT to find a version. (3.) The Team Foundation Service build name.

    So my questions are:

    1. How do I create the above described version number.
    2. How do I name the TFSerivce build name including the version number?
    3. How do I make GIT aware of the version number and display them “somehow”?

  • Sync GIT and ClearCase
  • Installing Git via Homebrew doesn't switch default to the Homebrew one
  • Can I rebase without first calling fetch from origin?
  • GIT Bash asking for my user credentials when performing a push using SSH
  • Retrieve a single file from a repository
  • Git2go: Simulate git checkout and an immediate git push
  • One Solution collect form web for “Version Number in Assembly, GIT and TFService”

    I don’t know if this question is still relevant. If it is, I can give a solution. The only thing I can’t answer is how to link an automatic generated build number following your specifications to a build name. For what I know, you need to choose between manually specifying your build number or auto generating it. Or you have to create a fully custom build template.

    Using the default template:

    • Specify your build number using the info on:
    • Put a “nextversion” file in the source control
    • Specify a “*” in the assemblyversion for the local revision autonumbering
    • Throw in a prebuild powershell script similar to (using the “nextversion” file instead of the -manually entered- build number)
    • In a post-build, create and push a tag with your version number onto the git repository, preferably using a powershell script (didn’t find an example – you best install the git tools on the build server for this). Also commit and push the modified assembly info files.
    Git Baby is a git and github fan, let's start git clone.