Reputation: 147
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.
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
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)
Upvotes: 1