What are the Build Types, how do I edit them

For people new to Team Build do read Overview of Team Build

Though most people using Team Build easily finds out how to create a build type and fire a Team Build, they find it difficult to figure out how to edit a Build Type. So one of the common use scenario is to re-create the Build Type again with the changes required. Though this is perfectly fine and talks a great deal about the ease of using the Wizard to create a new build type, but results in Build Types hanging around.

Editing build type is easy once you know what is a Build Type and where they go once created.

How do you create a Build type

Right click on the Team Build node on the Team Explorer and choose "New Team Build Type" from the context menu. This launches the Wizard to create the Build Type (refer Using the New Build Type Wizard for more info)

Where did the Build Type go?

Once a Build Type is created a set of three files are created and checked in to source control at the following server location $/{TeamProjectName}/TeamBuildTypes/{BuildTypeName}

In Beta2 the server location used to be $/{TeamProjectName}/TeamBuildConfigurations/{BuildTypeName}. So replace all references to TeamBuildTypes with TeamBuildConfigurations if you are working with VS2005 Beta2

Team Build operates and works on some thing called Build Types. Build Type is essentially a set of 3 files that reside on the Source Control as follows

  • $/{TeamProjectName}/TeamBuildTypes/{BuildTypeName}/TeamBuild.proj
    The main BuildType file that we would be interesting is editing.

  • $/{TeamProjectName}/TeamBuildTypes/{BuildTypeName}/VCOverrides.vsprops
    Used for building VC++ projects to override some build properties like the OutputDirectory

  • $/{TeamProjectName}/TeamBuildTypes/{BuildTypeName}/WorkspaceMapping.xml
    This is used to recreate the users Workspace on the Build Machine to sync sources prior to build.

Interestingly the Build Type name is not stored in any of the files. The name is same as the name of the folder in TeamBuildTypes that contain these files

Viewing the Build Type files

Build Types in Source Control Viewing the build type files is same as viewing any file in the Source Control. You need to create a Workspace that maps the Build Type files to some local folder, sync the file and open them in any text editor. This can be done in a number of ways and one of them is clearly mentioned as comment on top of the generated TeamBuild.proj file. So if you right click on any of the Build Types under the Team Build node in the Team Explorer and choose "View Team Build Type" then the file is downloaded from the server to the local machine and opened in VS. One thing to keep in mind is that the file opened is a local copy and changes made to it will NOT be reflected in the actual TeamBuild.proj on the server.

Editing the file

Double click on the version control node in the Team Explorer to bring up the Source Control Explorer. If in the Folder list the TeamBuildTypes and its children are grayed out then that means that the folders are not mapped in the current workspace. In the tool window on the top of the Source Control Explorer select Workspaces... in the Workspace drop down. Select your current workspace and click on edit. In the Edit workspace dialog add mapping for the TeamBuildTypes folder. See image.

Edit workspace dialog

Once the mapping has been added right click on the TeamBuildTypes node in the folder and get the latest version. After that right click on the TeamBuild.proj and check out for edit. Double click on the file to open it in VS for edit.

TeamBuild.proj file is an xml file and heavily commented so that it is easy to edit. Just look for <Description> and add some description to the Build Type, search for <DropLocation> and change the location where the build bits will be dropped. Keep reading the comments and that will guide you in your changes to this file. At the end save the file and go back to the Source Control Explorer, right click on the checked out TeamBuild.proj and check in the file and you are done

You can verify that your changes have gone through by right clicking on the Build Type you changed in the Team Explorer and choose "View Team Build Type". The opened Build Type should have your changes in it.






Comments (9)

  1. Abhinaba Basu on marking required fields in work items ⊕ and build types ⊕

    Adam Singer on the latest…

  2. Build process in Team Build is highly extensible. A custom step/task can be introduced at any build phase….

  3. Build process in Team Build is highly extensible. A custom step/task can be introduced at any build phase….

  4. Eric Matz says:

    Thank you! This post helped me figure out a lot. Much appreciated!

  5. crish says:


    I came across your article while browsing for a scenario. It was more informative.

    Iam now working on a solution that implements team build having sone C# and some win 32 c++ projects linked together. Can you please give me information as how can I build using Team Build. I’ve RC1 version of TFS.

    What kind of build types and configurationtobuild i ‘ve to use.

    Thanks in advance,


  6. crish I need some more info to help you out. Instead of doing that over this blog, why don’t you drop a detailed post in http://forums.microsoft.com/msdn/showforum.aspx?forumid=22&siteid=1 . This forum is actively monitored by a huge gang of dev and test in TFS. So either me or someone else will pick up your query.

    You can drop me a line using the contact option in the blog and I can take this up with you over email as well. However you’d get faster turn-around time using the forum, due to folks in all time zone monitoring it…

  7. Figuring out permissions is one of the most common stumbling points in the use of any new product where…

  8. nmueggler says:

    Is it possible to get a list of build types through the Team Foundation API?

  9. Unfortunately the answer is no. You need to write your own code to figure that out. We are aware of this limitation. However, I no longer work in that team and so wouldn’t be able to comment on whether its going to be fixed in the next version. Please drop a post on the forum at http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=481&SiteID=1 this is monitored by the relevant dev’s and PM’s and you’ll get a response

Skip to main content