29 June 2010

Visual Studio 2010 VM and Hands-on-Labs

Brian Keller recently posted the availability of the new Visual Studio 2010 RTM Virtual Machine with Sample Data and Hands-on-Labs.

This virtual machine (VM) includes Visual Studio 2010 Ultimate, Visual Studio Team Foundation Server 2010, and a sample application along with sample data which supports 9 hands-on-labs. This VM includes everything you need to learn and/or deliver demonstrations of many of my favorite application lifecycle management (ALM) capabilities in Visual Studio 2010. This VM is available in the virtualization platform of your choice (Hyper-V, Virtual PC 2007 SP1, and Windows [7] Virtual PC).

This is a great download for anyone wanting to learn more about TFS, experiment with new features, or even for giving presentations.

Check out Brian’s post for the full details.

26 June 2010

Visual Studio 2010 Architecture Tooling Guidance

The Visual Studio ALM Rangers have just released the Visual Studio 2010 Architecture Tooling Guidance.  Here is the description of the guidance:

Practical guidance for Visual Studio 2010 Ultimate, focused on modeling tools. This release includes common usage scenarios, hands on labs and lessons learned from community discussions. The scenarios include understanding and reverse engineering an existing solution or starting a new solution from scratch. These are both common challenges that any dev lead or architect faces. The intent is not to give you an in-depth tour of the product features, but to present you with examples that show how these tools can support you in real world scenarios, and to provide you with practical guidance and checklists. This guidance is focused on practical ways of effectively using Visual Studio 2010 Ultimate and other tools to create a new or revised design as part of application lifecycle management (ALM).

The Rangers involved with this project are: Alan Wills (MSFT), Bijan Javidi (MSFT), Christof Sprenger (MSFT), Clemens Reijnen (MVP), Clementino de Mendonca (MVP), Edward Bakker (MVP), Francisco Xavier Fagas AlbarracĂ­n (MVP), Marcel de Vries (MVP), Michael Lehman (MSFT), Randy Miller (MSFT), Tiago Pascoal (MVP), Willy-Peter Schaub (MSFT), Suhail Dutta (MSFT), David Trowbridge (MSFT), Hassan Fadili (MVP), Mathias Olausson (MVP), Rob Steel (MSFT) and Shawn Cicoria (MSFT).

There are three separate packages available for download, including:

  • Common Questions and Scenarios --> Start here
  • Common Questions and Scenarios Visual Studio Extension Guidance Package (forthcoming)
  • Hands-On-Labs (HOLs), including:
    • New Solution Scenario (HOL)
    • Reverse Engineering Scenario (HOL)
    • Extensibility Extensions (HOL)
    • Extensibility Layer Diagrams (HOL)
    • Reusable Architecture (HOL)
    • Validating an Architecture (HOL)

For more information, visit the Architecture Tooling Guidance site.

18 June 2010

WCF Load Test (Beta) for Visual Studio 2010

The Visual Studio ALM Rangers have released an update to the WCF Load Test Tool.  Apart from some bug fixes, the main difference is that this version integrates with Visual Studio 2010 Ultimate Edition.  After this release, the Rangers plan to convert the code to the .NET Framework 4.0, so future releases will only work with Visual Studio 2010 or later.

If you’re not familiar with the WCF Load Test Tool, here’s a quick description:

This tool takes a WCF trace file and a WCF client proxy, or a WCF interface contract, and generates a unit test that replays the same sequence of calls found in the trace file. The code generated is easily modifiable so that data variation can be introduced for the purpose of doing performance testing.

Please post your feedback on the Codeplex Discussions tab.

You can download the release here.

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.