How to get changesets/workitems belonging to a particular sub folder (only)?

  1. Edit the tfsbuild.proj and over ride the label task definition. Do note that changes in Name and Files argument. The Files attribute is used to define the scope of labels incase it is disjoint. Name of the label now contains the explicit scope.

  2. Initialize the value of the property GetGhangesetForFolder. The folder should not be team project. For example (1) if your folder is $/teamproject/myfolder, then the value should be "myfolder", (2) if your folder is $/teamproject/myfoldder/component1 then the calue should be "myfolder/component1". 

Add the following stuff to your tfsbuild.proj




<Target Name="CoreLabel"

          Condition=" '$(IsDesktopBuild)'!='true' "

          DependsOnTargets="$(CoreLabelDependsOn)" >

    <!-- Label all the latest non deleted files in workspace -->


       Condition=" '$(SkipLabel)'!='true' "







       Recursive="$(RecursiveLabel)" />


Additionally note that you do not need to override the LabelQueryScope property.


Comments (3)

  1. Anutthara talks about using Team Build with VSS or your own source control.

    Paul Whitaker blogs about…

  2. laurent says:


    Where do I find <label> definition? I did a reflector on Microsoft.TeamFoundation.Build.Tasks.VersionControl.dll but there is no comment

    thanks in advance

Skip to main content