How to build previous versions of SRC code using TFS Build and Build Agent?

Most of the time you want to build the latest and that is fine. That is the default and works well. How about the case where you wanted to build a past version of the SRC code.

TFS Team Build has this capability, though it is not very obvious.

 

For this pick up the Build Definition, for which you wanted a build out of a *non-latest* version of source code and Right Mouse and Click on "Queue Build".

Here you will see the parameters tab, and then the option to specify the specific version in "Get Version".

 

 

This screenshot is from 2013, but its basically the same in 2010/12 as well.