How to call a custom target after building each individual solution (sln) in Team Build?

  Issue: – I would like to invoke a specific target just after each solution is compiled. Unfortunately, team build performs a build including all solution in an atomic MSBuild call. I don’t want to make changes in my sln or csproj files but I am OK with modifying the tfsbuild.proj. What can I do…

8

Different behavior of StopOnFirstFailure flag with respect to slns and xxprojs in Team Build

  Issue – StopOnFirstFailure flag is respected when we are building multiple solutions and find the error in 1st solution and stop building the rest of solutions. However when we have a scenario where a solution contains multiple projects (csproj’s) and 1st project has error, the build continues to build the remaining projects and this…

1

Stopping the build after first (compilation) error in team build

  Scenario – We are building multiple solutions in our Team Build project file. We want to halt the build when the first compile error is encountered.   Answer –   If you are building multiple solutions (sln’s) and you encounter error in any sln, the build process will not stop after that sln and will continue…

6

FAQ

  Is it a good idea to use the same machine as “build machine” and “team foundation server”?   It is not a good idea to make Team Foundation Server machine as build machine for real life deployment (ok for demos/trials etc). The main reason is for debugging build failures etc, many people in org…

0

Configuring destop builds for building specific solutions in Team Build

  Scenario I have set up a Team Build Type which builds an entire system consisting of multiple solutions. I want an easy way for developers to be able to invoke builds on there dev machines (for only the solutions they are working on) using Team Build. We do not want developers to build the entire…

4

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

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. Initialize the value of the property GetGhangesetForFolder. The folder should not be team…

3

How to customize the drop location in team build?

For eaxmple in your tfsbuild.proj, the value of DropLocation is \\machine\drop1 and you want to change it to \\machine\drop2. Edit your build type definition (tfsbuild.proj) file and overload the BeforeEndToEndIteration <Target Name=“BeforeEndToEndIteration“>     <CreateProperty Value=“$(CustomDropLocation)“ >         <Output TaskParameter=“Value“ PropertyName=“DropLocation“/>     </CreateProperty> </Target> Edit the tfsbuild.rsp file to pass the custom value of drop location. Add…

3

custom msbuild task to get changesets and workitems based on AreaPath

    Objective of sample task   Get all the affected change sets between this build and the previous successful build that has the work items with Area Path according to input parameter specified in the .proj file.   You need to make the following changes in your tfsbuild.proj   1.    Compile the code and…

10

Redirecting the copy of output assemblies for individual solutions to specified subfolders at drop site in Team Build

  Team Build overrides the output directories that are specified in the individual project files, and thus places all build output at $(BinariesRoot)\$(Platfom)\$(Configuration)\   Is there a way disable copying the assemblies at drop site?  Yes, you need to set the SkipDropBuild property to true inside your tfsbuild.proj file.    Disable override behavior and have…

9

Issues in create the instance of singilton class using reflection in C#

  Scenario –   I have a public class (named class1) with only internal constructors. Assume this class exists in assembly class1.dll. Now I want to create the instance of class1 inside another public class (named class2) that exist in another assembly (class2.exe).   Case A   Class1.dll   namespace ns1 {     public class…

6