简体   繁体   中英

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.

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)

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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