TFS Overview

    Preface

    This document is a companion to the XL Deploy TFS plugin manual. It provides a high-level overview of Team Foundation Server (TFS) and how it works with the XL Deploy TFS plugin.

    Background information

    TFS combines a source control system, a build service, a bug tracking system, and more. The XL Deploy TFS plugin deals with the build system exclusively.

    In TFS, you can have multiple project collections; but today I'll pretend there's only a single one. That's a fair approximation since different project collections don't talk to each other anyway.

    In TFS, everything that is version-controlled is reference by a TFS path that starts with $/. For example, the MvcMusicStore project root would be $/MvcMusicStore.

    TFS workflows

    A TFS build workflow is defined by an XAML file (XAML is an XML dialect). New TFS team projects receive a default set of XAML files, and the XL Deploy TFS plugin provides another set. These XAML files are templates for a TFS build and contain parameters to be set when a build is started.

    You can set a build definition from the Team Explorer window by indicating an XAML file to use and entering default values for a specific build. It can be any XAML file anywhere in the project collection. For example, for MvcMusicStore, I may indicate that a build should use $/NerdDinner/BuildDefinitions/NerdDinner_deployit.xaml.

    Therefore, an enterprise may have a kind of 'Common Build Infrastructure' project that contains XAML files. The XL Deploy-enabled workflow should be placed in such a project, so other projects can use it or clone from it.

    Custom activities

    The XL Deploy-enabled build workflow uses custom activities to drive XL Deploy. These activities are executable code provided by a number of DLL files, which build agents must be able to find.

    The Build Controller defines a TFS path where it looks for DLLs that contain custom activities. Usually that location is also in the common build project. Because it is a TFS location, the build agents know how to get the DLLs. You only have to place the DLLs in that location.

    This also makes the DLLs available to Visual Studio, which requires them for the XL Deploy credentials. You may need to restart Visual Studio to load new DLLs. Visual Studio may not recognize new DLLs without being restarted; if you are unable to enter default credentials for TFS to use, restart Visual Studio.

    After the XAML and DLLs are in place, you can use the custom activities in your customized build flows. Each activity takes some input parameters, and some have output parameters as well; see the TFS plugin manual.

    Note: The Build Controller is used for all projects in the project collection. Therefore, you should not allow it to point to sample projects such as NerdDinner or MvcMusicStore for custom activities, because this would make all other projects dependent on the sample projects.