.net – Automatically updating a file with Revision from TFS

msbuildnettfs

I'm quite new to TFS (actually I only use it because I have some projects on CodePlex and did not want to go through svnbridge), and I'm looking for something equivalent to the $Revision$ parameter in SVN.

Essentially on checkout, I want to update a file to contain the newest Revision number, to be displayed as Version number (just like at the bottom of SO).

Is there anything already built-in in msbuild of .net 3.5 SP1, or any official/standard msbuild task, or even something equivalent of just dropping $Revision$ and having the TFS client do the magic on checkout?

Best Answer

Keyword expansion is not currently supported in TFS. This often takes people by suprise. Below are a couple of blog posts on the topic, you will also find a link there to take you to the Microsoft site if you want to vote for the feature. I know that it is something that the Team get asked for from time to time - but they have yet to come across anyone that actually needs keyword expansion anymore, just a lot of folks are kinda just used to it.

Anyway - have a read and see what you think.

Related Topic