To make it clear have a look at below source control history in my demo app. My changeset 87 has already gone into Production. Now I am creating a new TFS release build definition and when I queue a build in this release build I want it to get associated with chagesets 93 to 97.
If I queue a build with will build for latest sources in the TFS and no changesets get associated to the build.
To get my changesets 93 to 97 associated to build first I need to build for changeset 87. Then I can build for latest solution and it will associate from 93 to 97.
I can specify the changeset to build by advance options "Get Version" when I queue a build like below.
Now when I queue the build it builds for changeset 87.
Now I queue another build with not specifying a changeset. This will build the latest sources
This build will associate the changesets from 93 to 97 as I expected
If it is necessary I can repeat the same steps to do another build from this definition to associate set of changesets that I would like to associate with it.
I will explain how to generate a Build Note with TFS build in my next post.
There are few types of parameters that can be send to "Get Version" of advanced options of queuing build. For details check http://msdn.microsoft.com/en-us/library/gg490833.aspx#VersionSpecs