lumberjack4
lumberjack4

Reputation: 2872

Update Changed Assembly Version Number TFS Build

I'd like to be able to automatically update the assembly version off all changed projects on a TFS check-in. We'd like to do this as part of our gated check-in so that developers don't have to remember to manually update those numbers on every check-in.

My current approach would be to:

  1. Determine what projects contains changes on check-in
  2. Check out the AssemblyInfo.cs in each project with changes
  3. Increment the version number in each AssemblyInfo.cs file
  4. Begin build process

I assume there is a way to accomplish this using a combination of PowerShell and customizing the TFS build template, but have little familiarity with either. Any help on the matter would be greatly appreciated.

Upvotes: 0

Views: 3394

Answers (2)

Khawaja Asim
Khawaja Asim

Reputation: 1387

How to update assembly version of your projects using PowerShell scripts. A very good guide.

The answer is bit late but you can find a good guide here , Have a look into that

Upvotes: 2

ds19
ds19

Reputation: 3175

Use the script located here as a pre-build script in your build template.

The script will change all AssemblyInfo.cs files that are found with the build number.

Upvotes: 4

Related Questions