15 June 2010

Removing “Stuck” TFS 2008 Build Controllers

When migrating from Team Foundation Server 2008 to Team Foundation Server 2010 the TFS 2008 build controllers are included.  Even if you’ve setup and configured new build controllers for TFS 2010, you will still see the old (TFS 2008) build controllers in the Manage Build Controllers dialog (note: to display the Manage Build Controllers dialog, expand a team project’s node in Team Explorer, right-click on the Builds node, and select Manage Build Controllers).

In the screen shot below, you can see the Default Build Controller for TFS 2010 at the top along with ten build agents below (spread across five build machines).  At the bottom, there are two build controllers left over from TFS 2008.  Note that the Status is set to “Offline”.  If you no longer need the old (TFS 2008) build controllers, you can select them and click on the Remove button.  In most cases, this works as expected – the build controllers go bye-bye.

Manage Build Controllers

In some cases, you might get a dialog like this:

Can't Delete Build Controller

This dialog is telling you that one or more builds were in a Queued state when TFS 2008 was migrated to TFS 2010.  Since it thinks a build is active/queued, it will not allow you to delete the old build controller.

So, how do you get rid of the build controller?  All you have to do is locate the offending builds (left over from TFS 2008) and cancel them.  Sounds simple, right?  The problem is that there is no built-in mechanism for viewing a list of all queued builds across all build agents for a build controller.  So, you have a couple of choices:

  1. Go through the builds for each of your team projects one-by-one looking for queued builds.  This approach is simple enough if you have only a few team projects.  But what if you have dozens or hundreds?
  2. Locate the queued builds by querying the TFS transactional database.  This option does require at least “Read” access to the Team Project Collection (TPC) database.

Following step 2 above, to get a list of queued builds, run the following SQL script (using the correct collection database name):

SELECT bc.DisplayName, bq.DropLocation, bc.QueueCount, bc.Status
  FROM [Tfs_DefaultCollection].[dbo].[tbl_BuildController] bc
  JOIN [Tfs_DefaultCollection].[dbo].[tbl_BuildQueue] bq ON
bc.ControllerId = bq.ControllerId
WHERE bc.Status = 2 -- Queued
ORDER BY bc.DisplayName

This will give you a list of results including all builds currently in a “Queued” state.  For example:

DisplayName       DropLocation         QueueCount  Status
OLD-Controller1\  \\DropMachine\Proj1  3           2
OLD-Controller2\  \\DropMachine\Proj2  3           2

Using the information above, you should be able to determine which project(s) have queued builds lingering around.

Armed with this information, expand the desired team project in Team Explorer, right-click on the Builds node, and select View Builds.

View Builds

Click on the Queued tab, and if necessary, modify the filters to display all queued builds.  You should now see the queued build in the list.

Show Queued Builds

To cancel the build, simply right-click the desired build in the list and select Cancel.  If there are any remaining builds in your list, simply repeat these steps until all desired builds have been cancelled.

Cancel Build

Once the builds have been cancelled, you should be able to remove the old build controllers from the list as shown above (via the Manage Build Controllers dialog).

As an alternative to the “search-and-cancel” process above, you can also set the value of the tbl_BuildQueue.Status column to 16 – for “Cancelled” (for each of the builds to be cancelled).  This has the same effect as manually cancelling a build in the Build Explorer but it does require rights to update the data in the database.

27 May 2010

Check for Warnings/Errors Check-in Policy (2008)

A couple of weeks ago, I posted on an update for the Check for Warnings/Errors Check-in Policy for Visual Studio 2010 / TFS 2010.  This version was posted here on the Visual Studio Gallery.  Since then, I’ve received some questions about an update for the Visual Studio 2008 / TFS 2008 version of this check-in policy as the one I posted last September had an issue when checking in source code from the command line.

I have now also posted an updated version of the Check for Warnings/Errors Check-in Policy for Visual Studio 2008 / TFS 2008.  If you’re still using TFS 2008 (and I’m sure a lot of you are) then you can download the updated check-in policy here.

Usage:

To add this check-in policy to your Team Project:

  1. Download and install the Check for Compilation Warnings and Errors Check-in Policy.  NOTE: Anyone checking in code will need to install the check-in policy on their local development workstations.
  2. Within the Team Explorer in Visual Studio 2008, right-click on the desired Team Project and select Team Project Settings->Source Control.


  3. Click on the Check-in Policy tab, select Check for Compilation Warnings and Error Policy and click OK.


  4. Click on the Edit button and select the level of Warnings and/or Errors to check for.


  5. Click OK and OK to close the dialog windows.

Once installed and configured, the check-in policy works like any other.  You can check the Pending Changes window for violations as seen in this screen shot:

Compatibility:

This version of the Check for Compilation Warnings and Errors Check-in Policy supports Visual Studio 2008 and Team Foundation Server 2008.  The Visual Studio 2010 version is available here.

26 May 2010

OTSUG – Migrating to TFS 2010

Last night, Russ Wagner and I met with the Omaha Team System User Group to present on “Migrating to TFS 2010: Lessons Learned”.  Once again, Farm Credit Services of America hosted the event and provided pizza for the attendees.

Here’s the description of the talk we gave:

In this presentation, Jeff Bramwell and Russ Wagner will discuss the steps taken to upgrade to Team Foundation Server 2010.  The talk will cover up-front planning, tasks that need to be completed in the process, and how to plan for contingencies.  They will also cover various lessons learned along the way.  After the session, they will open it up for questions and answers to give attendees a chance to ask questions as well as share experiences with each other.

It was a small group but everyone came prepared with questions which made for a great and interactive discussion.  We enjoyed the opportunity to share some of the lessons we learned from our experiences while migrating from TFS 2008 to TFS 2010.  All in all, it was another great user group meeting!

If you’re interested in the PowerPoint slides, they’re available here.  For more information about the Omaha Team System User Group:

18 May 2010

TFS Administration Tool v2.0 Released

With each release of Team Foundation Server, administration gets a little easier.  The release of TFS 2010 introduces the Team Foundation Administration Console (TFS Admin Console) providing a much simpler approach to administering Team Foundation Server.  However, even the TFS Admin Console does not provide any support for managing permissions between Team Projects, SharePoint, and SQL Server Reporting Services (SSRS).

That’s where the Team Foundation Server Administration Tool comes in…

Here’s the official description from the TFS Admin Tool site:

The TFS Administration Tool allows Team Foundation Server administrators to manage user permissions on all three platforms utilized by Team Foundation Server: Team Foundation Server, SharePoint, and SQL Server Reporting Services. The tool also allows administrators to easily copy user permissions among team projects and to easily identify any missing permissions on any of the three platforms.

If you manage user permissions for any number of Team Projects, this utility is a must have!

As of a few days ago, Version 2.0 of the TFS Admin Tool was released.  This release focuses on resolving several bug fixes and introduces a new feature – User Import.  The new User Import feature allows you to easily copy user permissions from one Team Project to another – very handy!

Version 2.0 supports TFS 2005, 2008, and 2010 – with some caveats.  Before installing the Team Foundation Server Administration Tool v2.0, you must have the following installed:

NOTE: Even if you have Visual Studio 2010 installed, along with the Visual Studio Team Explorer 2010 client, you will still need to have the Team System 2008 Team Explorer client (with SP1) installed.  The TFS Admin Tool is currently compiled against the TFS 2008 Object Model and therefore must have the referenced assemblies installed on the client machine.  At some point in the future, once some internal code refactoring has taken place, there will most likely be a version compiled directly against the TFS 2010 Object Model that does not require any of the TFS 2008 assemblies to be installed.

So, download the tool and try it out.  Please provide feedback on the project site in the Discussions or Issue Tracker tabs.

14 May 2010

Check for Warnings/Errors Check-in Policy

A while back, I wrote about the Check for Warnings/Errors Check-in Policy – a custom check-in policy that I had developed for Team Foundation Server 2008.  Yesterday, I published version 2.1, updated for Team Foundation Server 2010, to the Visual Studio Gallery.  The features are the same as the TFS 2008 version with a couple of exceptions:

  1. You now have the ability to restrict the set of warnings to Code Contract warnings only.
  2. The settings for the check-in policy are now stored as TFS properties (more on this in an upcoming post).

Here are the details…

Usage:

To add this check-in policy to your Team Project:

  1. Download and install the Check for Compilation Warnings and Errors Check-in Policy (see Where to Download below).  NOTE: Anyone checking in code will need to install the check-in policy on their local development workstations.
  2. Within the Team Explorer in Visual Studio 2010, right-click on the desired Team Project and select Team Project Settings->Source Control.

  3. Click on the Check-in Policy tab, select Check for Compilation Warnings and Error Policy and click OK.



  4. Click on the Edit button and select the level of Warnings and/or Errors to check for.  If you select Warnings, you can optionally restrict the set of warnings to Code Contract warnings only by checking the Code Contract Warnings Only checkbox.



  5. Click OK and OK to close the dialog windows.

Once installed and configured, the check-in policy works like any other.  You can check the Pending Changes window for violations as seen in this screen shot:

Compatibility:

This version of the Check for Compilation Warnings and Errors Check-in Policy supports Visual Studio 2010 and Team Foundation Server 2010 only - it is not compatible with Team Foundation Server 2008.

Where to Download:

There are two options for downloading:

  1. You can download this check-in policy directly from the Visual Studio Gallery – here.
  2. From within Visual Studio 2010, you can use the Extension Manager to locate and download the check-in.  To do this:
    1. Click on Tools—>Extension Manager.
    2. Click on the Online Gallery “tab” on the left side of the Extension Manager dialog.
    3. In the Search Online Gallery field, enter “check for warnings” and press Enter.
    4. Locate the “Check for Compilation Warnings and Errors Policy” (at the time of this writing, it is the only item in the search results) and click Download.

If you have any feedback, please utilize the “Reviews” and/or “Discussions” tab on the gallery link above.

24 April 2010

TFS 2010 Power Tools Released

The first official (RTM) release of the Team Foundation Server Power Tools for Team Foundation Server 2010 have been released.  There are three separate downloads available:

TFS Power Tools April 2010 release – This is the main set of TFS Power Tools and contains the following high-level features:

  • Alerts Explorer
  • Best Practices Analyzer (BPA)
  • Custom Check-in Policy Pack
  • Process Editor
  • Team Explorer Enhancements
  • Team Foundation Power Tool (TFPT.exe)
  • Team Members
  • Windows PowerShell CmdLets
  • Windows Shell Extensions
  • Work Item Templates

TFS MSSCCI Provider 2010 release - The Team Foundation Server MSSCCI Provider enables integrated use of Team Foundation Version Control with products that do not support Team Explorer integration.

TFS Build Extension Power Tool April 2010 release - The Team Foundation Build Extensions provide the ability to execute Ant or Maven 2 builds from Team Foundation Server and publish the results of the build along with any associated JUnit test results back to Team Foundation Server.  This release is compatible with Team Foundation Server 2005, Team Foundation Server 2008 and Team Foundation Server 2010.

Click on the links above for further details and downloads.

20 April 2010

Visual Studio 2010/TFS 2010 Utility Roundup

Well, Visual Studio 2010 and Team Foundation Server 2010 have been “in the wild” for a little over a week now.  Now that the RTM versions have had a few days to settle in, I decided to do a quick survey of some of my favorite utilities to see if they have been updated to support the final release of Visual Studio 2010 and TFS 2010.  Here is the list:

If you’re looking for more utilities for Visual Studio 2010, check out the Visual Studio Gallery for Visual Studio 2010.

12 April 2010

Visual Studio 2010 Launches/RTMs!

visual-studio-2010-logo After months (years?) of anticipation, Visual Studio 2010 has finally launched/RTM’d!  If you are a MSDN subscriber, you can download the full version from the MSDN Subscribers site.  The trial editions should be available on the Microsoft Downloads site soon.

There are far too many new features in Visual Studio 2010 to be listed here.  However, here are a few links to get you started…

 

 

More to come…

23 March 2010

OTSUG - What’s New for Testing in Visual Studio 2010 and TFS 2010

Please join us on Tuesday, March 23rd as Mike Douglas presents on "What’s New for Testing in Visual Studio 2010 and TFS 2010".  As we near the launch of Visual Studio 2010 and Team Foundation Server 2010, this is a great opportunity to catch up on some of the new features being made available.

Visit Omaha Team System User Group for full meeting details.

Hope to see you there!

15 March 2010

Team Explorer 2005 Update for TFS 2010 is Available

If you are using Visual Studio 2005 (along with Team Explorer 2005) to access Team Foundation Server, an update patch has been released that will allow Team Explorer 2005 to communicate with Team Foundation Server 2010.

In general, after installing the update patch, you will be able to use Visual Studio 2005 to access legacy (2005) TFS servers as well as TFS 2010 servers.  If you switch to a TFS 2010 server, you will be able to continue using the basic functionality of TFS but will not be able to utilize new TFS 2010 features (e.g. Branch Visualization, creating new Team Projects, etc.) - you must use Visual Studio 2010.

Also, when connecting to a TFS 2010 server, you will need to enter the full URL for the TFS 2010 Team Project Collection – e.g. http://TFS2010Server:8080/tfs/CollectionName.

Click here for more information.

Downloads: