Fabito
Fabito

Reputation: 1224

MSBuild autoincrement version - TFS2010

I created a build definition with some MSBuild Arguments (/target:Publish /property:PublishDir=\mypc\tmp\ /property:ApplicationVersion=1.0.0.1)

What's the best way to increment the ApplicationVersion for each build automatically?

Upvotes: 4

Views: 1848

Answers (1)

Gerrie Schenck
Gerrie Schenck

Reputation: 22378

First of all I suggest you make sure all projects in your solution use a shared AssemblyInfo file (as mentioned here).

Then alter your build script so the file is checked out, the version number increased and saved, then checked in again.

To do that have a look at the community build tasks, or create your own.

Upvotes: 4

Related Questions