Team System

Essential Power Tools.

Brian Randell

Contents

Team System Web Access
Team Foundation Server Power Tools
One Last Thing

Microsoft has a long history of introducing new features to already shipped products as a way to add value to what you have purchased. Many teams have released such enhancements under the banner of Power Toys.

The first release to be deemed a Power Toy came from the Windows team for Windows® 95. Other teams have followed suit, including the Visual Studio® Team System (VSTS) team. What you need to understand is that, unlike many of the Power Toys released by other teams at Microsoft, I find many of the tools released in this fashion by the VSTS team to be mandatory.

In this column, I'll provide you with a tour of the major tools that are available today and describe the ones I believe you really should download and use. While many items I'll discuss exist for VSTS 2005, I'll be focusing on the current releases available for the VSTS 2008 versions of the tools.

Team System Web Access

The very first item on your download list should be the VSTS Web Access 2008 Power Tool (go.microsoft.com/fwlink/?LinkId=120834). Team System Web Access, or TSWA, provides a rich Web-based access mechanism to your Team Foundation Server (TFS) installation, as shown in Figure 1. TSWA allows you to manage work items and builds, view and run reports, access SharePoint® document libraries, and view source files under version control. Microsoft acquired this tool and added it to its stable of available tools in March of 2007.

fig01.gif

Figure 1 Team System Web Access (Click the image for a larger view)

The team changed the name from Power Toy to Power Tool after the first few releases. Brian Harry, Technical Fellow and "godfather" of TFS, discussed this. Brian points out that the features the VSTS team is providing aren't really toys. They are out-of-band or off-cycle product updates or enhancements.

Note that the VSTS team and Microsoft both support these tools. Thus, you can use them with confidence. In fact, over time, many of the tools will find their way into the core products. For example, TSWA is planned to be a core component of the next release of Team System.

While I personally tend to prefer a rich client experience, having a rich Web interface is really a core feature needed by most development teams using TFS. When you install TSWA, you get the flexibility of using integrated authentication or forms-based authentication. Thus, you have the flexibility of installing TSWA for internal use only on your intranet or you can deploy it in an extranet environment.

Even though you can install TSWA on your application tier, typically you should deploy it on its own server. You just need Windows Server® 2003 or Windows Server 2008, IIS, and the Team Foundation Client 2008 installed. The client must be installed because currently there is no redistributable runtime for the TFS libraries. TSWA, along with any custom code you write, uses the client libraries to access TFS programmatically.

Once you deployed TSWA, you have a rich Web interface that duplicates most of the features found in the Windows-based client (checking in and out source code being the major missing feature). TSWA also adds some new features of its own, such as data access restrictions, text search, and workflow diagrams on work items.

You may be wondering how the SharePoint portal that the New Team Project wizard creates relates to TSWA. In general, you can view the SharePoint site as the primary Web interface for your internal team and stakeholders. The SharePoint site focuses on artifacts related to the software solution you are creating, overall project process, and reporting. TSWA provides supplemental features not available today via SharePoint, such as work items. In addition, TSWA provides an easier way to bring in external stakeholders and users—in particular, those users who don't need access to SharePoint but might want to file a bug and track its progress.

This last feature is significant. With the release of Team Foundation Server 2008, Microsoft modified the license agreement to allow any person to file a bug, track its status, or defect without the need for a client access license. However, TSWA doesn't offer an easy way to restrict access to features that could allow the user to accidently violate the license agreement (for example, managing another user's work items). To address this, Microsoft has published plans to provide an update for VSTS 2008, currently known as the TFS Bug Submission Portal Power Tool. This update grants access to just the limited feature set allowed by the license change. You can read the spec at go.microsoft.com/fwlink/?LinkId=120835. This is just one example of updates planned under the Power Tools umbrella.

Team Foundation Server Power Tools

The next item is a set of utilities of great value to just about every team: Visual Studio Team System 2008 Team Foundation Server Power Tools (go.microsoft.com/fwlink/?LinkId=120836). As of press time, the March 2008 release is the most current.

The collection of tools includes TFPT.exe, the Visual Studio Team System Process Editor, Team Foundation Server Best Practice Analyzer, work item templates, custom check-in policies, a Build Notification applet, and the TFS­ServerManager client. Included in the download is a detailed Microsoft® Word document that describes the contents and how to use the various tools.

TFPT.exe is a command-line tool found under %Program Files%\Microsoft Team Foundation Server 2008 Power Tools. It extends the built-in TF.exe command-line tool that is primarily used for working with the version control subsystem of TFS. Currently there are 19 supported commands (see Figure 2).

Figure 2 TFPT.exe Commands

Command Description
tfpt annotate Display line-by-line change information for a file.
tfpt bind Convert VSS-bound solutions into TFS-bound solutions.
tfpt changedocurl Update the server information on TFS-bound office documents.
tfpt createteamproject Create a team project.
tfpt destroygl Destroy a global list.
tfpt destroywi Destroy one or more work items.
tfpt destroywitd Destroy a work item type and its work items.
tfpt getcs Get only the changes in a particular changeset.
tfpt history Show the history of an item.
tfpt online Pend adds, edits, and deletes to writable files.
tfpt query Query for work items.
tfpt review Review (diff/view) workspace changes.
tfpt rollback Pend changes to roll back a changeset.
tfpt treeclean Delete files that are not under version control.
tfpt tweakui Enhance how client connects to TFS.
tfpt unshelve Unshelve into workspace with pending changes.
tfpt uu Undo changes to unchanged files in the workspace.
tfpt workitem Create, update, or view work items.
tfpt workspace Update a workspace.

Depending upon the command you choose, you might be required to provide additional parameters. Also, some of the commands, such as the rollback command, provide a GUI experience once you execute the command. Be aware that many of the commands require you to execute the tool from a folder that you've mapped to a TFS workspace. You'll want to modify your Path so you can easily execute TFPT.exe from any of your local workspaces.

For those of you who've used Team System for a long time, you might notice one command jumping out at you: create­teamproject. For some users, this has been a long time coming. The big caveat I want to mention is that you must apply SP1 to your Visual Studio 2008 client installation in order for this command to work. Other commands that I find very useful in my work include rollback, treeclean, and workspace. Check them out for yourself.

There's more goodness to be found related to version control in the Team Foundation Server Power Tools. First, there's the custom check-in policies pack. I described check-in policies in detail in the November 2007 issue of MSDN® Magazine. This adds a number of useful check-in policies to your installation. Custom Path Policy and Changeset Comments Policy are two I can't live without.

Second, you'll find a number of enhancements inside Visual Studio. Microsoft added some enhancements from the Team Foundation Server 2005 Power Tools in TFS 2008. Annotate is one example. However, some other goodies still require the Power Tools. For example, you get the Find in Source command, Quick Label, and a simple but welcome feature that opens the selected folder in the Source Control Explorer in Windows Explorer (see Figure 3).

fig03.gif

Figure 3 Open Folders in Windows Explorer (Click the image for a larger view)

Each time you create a team project, you specify a process template. Microsoft includes two out of the box. That said, I don't have a single customer who doesn't want to modify the base process templates. Most teams need to add additional fields to some of their work items, or they want to add their company logo to their reports, change the name of the Bug work item to Defect, or add their own docs to the SharePoint process guidance.

Microsoft did a great job of exposing extensibility points to enable these kinds of customizations. However, the out-of-the-box experience does leave something to be desired, unless you're editing process templates for a living. Without the Power Tools, you must download the process template to your local disk, put it under version control, and start editing the files.

You can edit some files, such as your report definition files, using nice GUI designers like those provided in Business Intelligence Development Studio. Other files types, however, like the ever-popular work item type definition files, require you to fire up Notepad or your favorite XML editor and begin hacking angle brackets. This is not the best experience if it's your first time modifying process templates.

Thankfully, the Power Tools include a process template editor. Once installed, you'll find the Process Editor menu command off the Visual Studio Tools menu. This tool allows you to edit your downloaded template's components on disk (or, against my general advice, you can edit some items such as work item type definitions online). For example, you can open the Scenario work item type from the Microsoft Solutions Framework for Agile Software Development version 4 template, define a new field for tracking your beverage of choice to drink once you ship a feature described by the scenario, then add this field to the work item layout, and get a preview of the change (see Figure 4), all without seeing any XML.

fig04.gif

Figure 4 A Modified Scenario Work Item Type Definition (Click the image for a larger view)

That said, as you become more comfortable with process template modifications, you might find that editing the XML files directly is more convenient. The good news is the Process Editor helps there, too. On most screens, you'll find a View XML button to show the XML fragment related to the particular feature you're editing. A big enhancement in the March 2008 release is updated support in the editor for adding custom controls to your work item type definitions. Prior to this release, you would receive an error if you opened a work item type definition that used custom controls.

Another feature related to work items in the Power Tools is work item templates. You create a work item template containing common default items for a particular work item type. Then when you need to open a new bug, for example, you select the template, and it will prepopulate the work item for you. Enhancements in the March 2008 release include work item templates having their own node in the Team Explorer window.

Over the years, Brian Harry has posted statistics related to the usage of TFS by Microsoft to his blog. These posts include data such as the number of items under version control, the server uptime, and the number of users. In the March 2008 release, Brian has published the tool he's been using for this under the guise of the TFSServerManager client. This tool provides an easy way to gather your own statistics on TFS usage for your development team.

The Team Foundation Server Best Practices Analyzer is a diagnostic tool that gathers configuration information from your TFS deployment and performs tests on it. It then analyzes the information using specific rules and gives you the results in the form of information, warning, or error messages. Beyond that it provides links to articles to help you resolve any warning and error situations.

This tool is useful both as a preinstallation step as well as for helping you maintain and monitor your TFS installation. You'll find documentation is included with it in the form of a Windows Help file (Tfs­Bpa.chm). But you must have Windows PowerShell™ installed before you install the Best Practices Analyzer.

Finally, related to Team Build, you'll find the Build Notification Power Tool. This tool runs in the Windows task bar's notification area. You configure it to monitor a specific set of build definitions on your TFS installation. You then tell it to notify you based on various events including when a build is queued, started, or completed. When one of the events occurs, such as a build is queued up, you'll receive a message in the lower-right corner of your screen (see Figure 5).

fig05.gif

Figure 5 Notification for a New Build

One Last Thing

All of the tools that I've referenced are great. Some, however, can adversely affect your local machine or server installation (anything with destroy comes to mind). Wouldn't it be nice to try things out where you wouldn't affect your real work environment? On the other hand, maybe you don't own TFS and want try it out. Or possibly you're interested in Visual Studio Team System 2008 Database Edition but don't currently own it?

One of the jobs I perform for Microsoft is to build a Microsoft Virtual PC image containing a complete Team System installation along with sample data and hands-on labs. You can download the compressed image from go.microsoft.com/fwlink/?LinkId=120876. This image contains a full TFS installation as well as Visual Studio 2008 Team Suite.

Assuming you have a machine that can run Virtual PC 2007 (or Virtual Server 2005 R2 SP1) and has enough free disk space, RAM, and a modern processor, you can download the image and try things out in your own private sandboxed environment. Microsoft posted the most recent version of the image at the end of March 2008. And this image will work until December 31, 2008. You should note that Microsoft restricts the use of this image to evaluation only—no production work, please.

Check the download site every few months, since Microsoft will post updates to the image containing Windows updates, additional Power Tools, and more. This is a great way to try things out, like the Power Tools, as well as to evaluate products you don't currently own.

The members of the Microsoft Team System team are committed to delivering the best products possible. Knowing they can't get everything in the box and still ship, they deliver these great additional products and features that add value to your existing purchase. That said, I only had space to cover the two biggest groups of Power Tools. You can also download Visual Studio Team System 2008 Database Edition Power Tools (go.microsoft.com/fwlink/?LinkId=120940) and Visual Studio Team System Architecture Edition Power Tools (go.microsoft.com/fwlink/?LinkId=120941), as well as the core Visual Studio product. I hope you get a chance to download and start getting the most out of your VSTS installation.

Send your questions and comments for Brian to mmvsts@microsoft.com.

Brian A. Randell is a Senior Consultant with MCW Technologies LLC. He spends his time speaking, teaching, and writing about Microsoft technologies. Brian is the author of Pluralsight's Applied Team System course and is a Microsoft MVP. Contact Brian via his blog at mcwtech.com/cs/blogs/brianr.