Search code examples
asp.netasp.net-mvcmsbuildtfsbuild

How do I insert the latest TFS changeset number into an aspx page?


When we were using SVN, we'd always print at the footer of our pages: "Revision XXXX". I've been looking, but I can't figure out how to do the same thing with TFS. Can anyone offer some pointers?

In case this matters: we're using ASP.NET MVC. I'm guessing it doesn't matter, however.


Solution

  • We ended up using a MsBuild task that searches for a particular string and replaces with the appropriate value (not necessarily the revision number).

    The task runs as part of our build templates and puts the revision number in all the files that have the token present.