VishwajeetMCA
VishwajeetMCA

Reputation: 147

Visual Studio Team Services Assembly Versioning

I am using Visual Studio Team Services. I have created a build definition using Hosted Build Controller and Hosted Build Agent. I have used a powershell script to assign version number automatically to assembly file or .exe file using TFS build number.

I have followed the following given links for this.

http://geeks.ms/blogs/jlsoria/archive/2014/02/17/get-your-binaries-versioned-automatically-in-less-than-5-minutes-with-tfs-build-2013.aspx

http://www.colinsalmcorner.com/post/matching-binary-version-to-build-number-version-in-tfs-2013-builds

But I am unable to assign version to my .exe application. All the time it takes version number from AssemblyInfo.cs file. My purpose is to assign value of TFS build number to my assembly file.

Upvotes: 0

Views: 261

Answers (1)

Vicky - MSFT
Vicky - MSFT

Reputation: 5010

Here are the steps:

1). Check in UpdateVersion.ps1 PowerShell file (content is from that blog) into TFS version control.

2). Set UpdateVersion.ps1 script to run via selecting it in pre-build script.

3). Set build number format to be: $(BuildDefinitionName)_1.0.1$(Rev:.r)

enter image description here

Upvotes: 1

Related Questions