07 July 2007

How to Determine what Version of TFS is Installed

There have been several posts out there to help out with determining what version of TFS is currently installed and when it was installed (e.g. here, here, and here). These suggestions require you to check out various file versions, poke around the registry, and/or query the data tier. To ease the process, I have put together a simple console-based utility, TFSInfo, that will give you some basic information (e.g. AT server name, DT server name, version - AT & DT, edition, reporting server URL, the TFS installation date, and product ID) for your TFS installation.

Here is an example screen shot of the utility's output:

To use this utility, download the ZIP file and extract TFSInfo.exe onto a machine that has the Team Explorer client installed. From a command console, run TFSInfo passing in the name of the TFS Server application tier.

The version of the application tier is determined by querying the version of the file 'Microsoft.TeamFoundation.Server.dll'.  The version of the data tier is determined by querying the TfsVersionControl database (read more here).

If you're running the utility directly on the application tier, you can leave the server name off and just run TFSInfo.exe.

NOTES:

  • If you run this utility on a machine other than the TFS Application Tier, you will need remote registry permissions as well as permissions to query the TFS Version Control system.
  • The data tier is queried using Integrated Security.  You will need access to the TfsVersionControl database in order to retrieve the data tier version.
  • Does not currently support TFS 2008. Support for TFS 2008 will no doubt be added in the near future.

Please comment if you have any questions and/or suggestions.

06 July 2007

Installing Service Pack 1 for TFS and VSTS

Although Service Pack 1 for Team Foundation Server and Visual Studio 2005 has been out for a while now, the installation process is not necessarily obvious.  Depending upon your configuration, there may be one or more files you need to install - and the order can matter.

Team Foundation Server:

  1. If you're running Windows Server 2003, there may be issues when attempting to install large MSI files (the Visual Studio 2005 Team Suite SP1 is over 400MB).  See knowledge base article KB925336 for more information as well as a downloadable update to resolve this issue.  Install this update first if you plan on installing SP1 on a Windows 2003 server.  This is about a 1MB download.
  2. A pre-requisite to installing SP1 on the Team Foundation Server is the Visual Studio 2005 Team Foundation Server Quiescence GDR.  There are (currently) two versions of this GDR.  If you have version one (VS80-KB919156-X86.exe) installed, then you'll need to download version 2 (VS80-KB919156-v2-X86.exe) and install it as well.  This is about a 4.5MB download.
  3. Install Visual Studio 2005 Team Foundation Server Service Pack 1.  This is about a 46MB download.
  4. If you have any of the Visual Studio SKUs installed on your Team Foundation Server (e.g. to support unit testing, etc.) then you'll need to install the Visual Studio 2005 Team Suite Service Pack 1NOTE: Depending upon the number of SKUs installed, the service pack installer will run multiple times (once for each SKU) so be prepared for multiple dialogs.  This is about a 430MB download.

Visual Studio Client:

  1. If you're developing on Windows Server 2003, see Step 1 above.
  2. Install the Visual Studio 2005 Team Suite Service Pack 1NOTE: Depending upon the number of SKUs installed, the service pack installer will run multiple times (once for each SKU) so be prepared for multiple dialogs.  This is about a 430MB download.
  3. If you're developing on Windows Vista then you'll need to install Visual Studio 2005 Service Pack 1 Update for Windows Vista.  This update (which shipped after the release of SP1) addresses areas of Visual Studio impacted by Windows Vista enhancements.

As with any upgrade, it is highly recommended that you perform a backup of your TFS installation prior to updating to SP1.

27 June 2007

Gearing Up for HDC 2007

It's that time of year again here in the heartland - preparation for the fourth consecutive Heartland Developers Conference.  Last year's conference went very well (Philip and Joe did a great job putting it all together) with a lot of great presentations and this year is looking to be even better.  A new track, “Manage It”, has been added this year which will focus on providing cutting edge content on topics like virtualization, technology driven project management, strategic process management, empowerment tools, and other topics that will help you to manage the development and implementation of your development projects.

Although the speaker schedule has not yet been updated on the HDC web site, I understand that the two keynote speakers will be Ron Jacobs and Scott Guthrie.  If you have an interest in architecture and/or ASP.NET/AJAX, you will definitely want to check out these guys if you're able to make it to the conference.

Last year, I had the privilege to give a presentation on automating the build process with TFS.  This year, one of my co-workers (Ron Yenko) will be presenting on Clustering SQL Server 2005 for High Availability.  It promises to be a great talk.

Hope to see you there.

20 June 2007

Visual Studio 2008 Beta 2 Includes "Go-Live" License

I noticed in a blog post by Scott Guthrie that Visual Studio 2008 (formerly known as "Orcas") will include a "go-live" license allowing it to be put into production use with a supported upgrade path to subsequent releases.

VS 2008 and .NET 3.5 Beta 2 will ship later this summer, and the Beta 2 release will support a go-live license for those who want to put applications into production using the new features immediately.

Also, just in case you missed it, "Orcas" is now officially known as Visual Studio 2008 and the related .NET Framework is known as .NET Framework 3.5.  Visual Studio 2008 has "multi-targeting" support which allows you to configure your Visual Studio 2008 projects to use the .NET Framework 2.0, 3.0, or 3.5.

Read the post here.

19 June 2007

A Quick eScrum Review

As many of you have probably noticed, Microsoft has released a new product called eScrum.  This product adds a scrum-based process template to your Team Foundation Server along with related functionality (e.g. product management, backlog items, tasks, sprint management, and reports) allowing you to manage various parts of the agile software development process.

eScrum is a Web-based, end-to-end project management tool for Scrum built on the Microsoft Visual Studio Team Foundation Server platform. It provides multiple ways to interact with your Scrum project: eScrum Web-based UI, Team Explorer, and Excel or Project, via Team Foundation Office Integration. In addition, it provides a single place for all Scrum artifacts such as product backlog, sprint backlog, task management, retrospective, and reports with built-in context sensitive help.

I installed eScrum this morning and gave it a short run-through.  Here are some of my initial thoughts:

  • Three words - "Complete the MSI"!  Although the eScrum product is downloaded as an MSI package, there are still quite a few manual steps that you have to complete before you're able to use the new template.  This includes downloading and/or installing the .NET Framework 2.0 (no biggy here), ASP.NET 2.0 AJAX Extensions 1.0, AJAX Control Toolkit, and the Anti Cross-Site Scripting Library 1.5.  You must also manually install the SharePoint templates as well as upload the process template to TFS.  These are tasks that would be better off automated.  There are also some file-based permissions that need to be configured - this would be better off automated as well.
  • You have to manually edit an XML file to include your eScrum Team Projects within the eScrum portal.  Shouldn't the portal be able to deduce which Team Projects were created with the eScrum process template?  If so, then this should happen automatically.
  • There are two "read me" documents that you must go through in order to setup & configure eScrum.  If the MSI is not going to automate the various tasks for you,then please combine these into a single document.
  • An "administration" screen would be welcomed - if you could add projects and group members from within the web site, it would keep you from having to switch back and forth between Internet Explorer and Team Explorer.
  • Minor issue - if I leave the product owner off when I attempt to save a new product, it tells me that the "Assigned to" field is empty.  I'm not sure if this can be changed or not, and it's really not all that important - just something I noticed.

Some tips:

  • Follow the "read me" documents step-by-step.  If you do this then you shouldn't have too many problems getting setup.
  • When you download the Anti Cross-Site Scripting Library, be sure you download version 1.5.
  • Be sure to follow the instructions for redirecting the AJAX Control Toolkit version to the version downloaded unless you happen to have version 1.0.10301.0 laying around.  eScrum was compiled against a version older than what is currently available for download so, unless you have access to the old version, you'll need to map the versions within the configuration file.
  • Make sure you edit the two XML files (as noted in the "read me" file) that configure which TFS server/port you're using as well as the name of the TFS eScrum-based Team Project(s) you've created and want to have access to via the web portal.
  • Once you've created the eScrum Team Project(s), you'll need to configure the Team Project security and add members to the "Contributors" group in order for them to show up in the portal as project members.
  • Once you install eScrum, help is available via the link on the web site.

All in all, I like what I see at first glance.  My favorite part of it all is the simplicity of the UI.  It seems that you have exactly what you need but nothing else.  We haven't had a chance to use it in practice yet so I'll be presenting it to my team over the next few days to see if there is any interest in trying it out (along with/instead of what we're currently using).

Downloads:

Other References:

01 May 2007

Programmatically Download Attachments from TFS

I created this short snippet of code the other day in reference to a forum question on how to retrieve the linked items for a given work item.  The code below uses the TFS Object Model to retrieve a specific work item (in this case, item #16) and save all attachments to the local file system.

Code Snippet
using Microsoft.TeamFoundation.Client;
using Microsoft.TeamFoundation.Server;
using Microsoft.TeamFoundation.WorkItemTracking.Client;
using System;
using System.IO;

namespace DTTFSLib
{
public class WorkItemTest
{
public WorkItemTest(string serverName)
{
// Connect to the desired Team Foundation Server
TeamFoundationServer tfsServer = new TeamFoundationServer(serverName);

// Authenticate with the Team Foundation Server
tfsServer.Authenticate();

// Get a reference to a Work Item Store
WorkItemStore workItemStore = new WorkItemStore(tfsServer);

// Retrieve a Work Item by ID - in this case, bug #16
WorkItem workItem = workItemStore.GetWorkItem(16);

// Get attachments
if (workItem != null)
{
System.Net.
WebClient request = new System.Net.WebClient();

// NOTE: If you use custom credentials to authenticate with TFS then you would most likely
// want to use those same credentials here
request.Credentials = System.Net.CredentialCache.DefaultCredentials;

foreach (Attachment attachment in workItem.Attachments)
{
// Display the name & size of the attachment
Console.WriteLine("Attachment: '" + attachment.Name + "' (" + attachment.Length.ToString() + " bytes)");

// Save the attachment to a local file
request.DownloadFile(attachment.Uri, Path.Combine(@"C:\Attachments", attachment.Name));
}
}
}
}
}

 


Note that exception handling and custom authentication have been left out for brevity.


Check out the Essentials of Work Item Object Model MSDN site for more information on the work item object model.

27 April 2007

TFS Exam 70-510 Goes Live w/Study Guide

I just read a post from Rob Caron announcing the availability of the preparation guide for Exam 70-510, Technology Specialist: Visual Studio 2005 Team Foundation Server. He also announces that the exam is now live for anyone interested in pursuing this certification.

26 April 2007

Answering: "When will bug 'xyz' be ready for testing?"

Have you ever been asked any of the following questions regarding work items: Is bug #123 ready for testing yet?, or When will I be able to test bug #456?, or What bugs are in the pipeline that will be ready for testing next?

If you're like me, you've probably answered the above questions at some point in the past something like: "Sure, it's been ready for testing for two days.", or "Bug #456 will be ready for testing after the next nightly build.", or "I don't know what bugs will be coming next, let me run some queries and get back to you."

Now, I'm a huge fan of Team Foundation Server but I hadn't stopped to take the time to put together a couple of relatively simple queries that would not only save myself and my fellow co-workers some time, but also make everyone's job just a little bit easier.  Before I detail the two queries that eliminated the above questions, here's some details on our environments and automated builds.

Currently, we develop projects and push them through four environmental stages:

  1. Development: this is where all developers work on a daily basis - more-or-less isolated from the rest of the world.
  2. System Test: this is the environment that our testers perform their daily testing.
  3. Integrated Test ("Staging"): this is where we test out the integration points among multiple applications.
  4. Production: of course this is the environment in which our daily business runs.

Now, for each of our Team Foundation Server projects, we have three standard build types:

  1. Continuous Integration Build: this build type is automatically executed with each check in and deploys any binaries, files, etc. into the Development environment.
  2. System Test Build: this build type is executed nightly on a scheduled basis.  All binaries, files, etc. are deployed to the System Test environment where our QA/Testers can "work it over" the following day.
  3. Integrated Test Build: this build type merely stages the various binaries, files, etc. to be pushed by the Integrated Test environment via CM processes.

So, back to the original goal of eliminating the original questions above.  To do this, I created two queries named:

  • Work Items Staged for Testing - this query, when ran, returns a list of all work items (e.g. Bugs) that have a State of "Resolved" and an "Integration Integration Build" (displayed as "Resolved in build" on the Work Item's Details tab) beginning with the text "Continuous Build" (the name of our CI build type).  So, basically, this returns a list of all Work Items that have been associated with a changeset that has gone through the CI process, which means it has been deployed to the development environment and will be deployed to the System Test environment after the next nightly build.

  • Work Items Ready for Testing - this query, when ran, returns a list of all work items that have a State of "Resolved" and an "Integration Build" that does not begin with "Continuous Integration Build" and is also not empty.  I do not specifically check for a "System Test Build" in this query because I am assuming that any build type other than the CI build deploys the changes into an environment from which they can be tested.

With the recent acquisition of TeamPlain by Microsoft, we have deployed the TFS portal within our project teams giving our testers a nice web-based interface into TFS.  Now, when they are curious about the state of existing work items, they can run the queries detailed above and get their answers immediately.

One caveat to all of this, if you decide to implement similar queries then you must ensure that your developers associate work items with their changesets when checking in source code (or other files).

Also, your build types must have the <UpdateWorkItems> element in your build scripts set to "true".  This setting is what causes the "Integration Build" value to be updated to the latest build number associated with the work item.

Without the integration of TFS & Visual Studio, these types of queries would be a lot more difficult (if even possible) to build.

17 April 2007

71-510: TS: Visual Studio 2005 TFS Beta Exam Results Are In

As you may have noticed in other posts, the results for the 71-510 beta exam are starting to show up on participant transcripts (on the MCP member site).  If you took the test a couple of months back then you may be able see your results by now.  I checked mine today to find out that I passed the exam.

Now that the beta results are starting to appear, the "live" exam will probably be available soon.  If you're planning on taking the exam, here are a couple of links to help get you started:

06 April 2007

Updated Team Foundation Server Roadmap for "Orcas"

Brian Harry has just published a new post detailing the future "Orcas" release of Team Foundation Server. The post is fairly detailed and he attempts to point out what features are new as well as what will be in the Beta 1 release vs. the Beta 2 release.

The features marked as new include:
  • TFS Best Practices Analyzer - A tool that can be run against your TFS server that will help diagnose configuration errors and tuning possibilities.
  • VSTS Web Access - There's been much written about this already but the new Web Access product from devBiz will be released as a Power Tool in the next 60-90 days.
  • Support for MOSS 2007.
  • Official testing and support for more configurations - This includes clustering, mirroring, log shipping, Virtual machine deployment, and more.
  • Scheduled builds - You can schedule builds to happen at specified times.
  • Improved build agent communication - We replaced .NET binary remoting with WCF web services, simplifying some configuration and security aspects.
  • Ability to run GUI tests as part of a build - Automated builds used to run tests in such a way as to prevent access to a GUI desktop.
  • New checkin policy for broken CI builds - Preventing checkin while the CI build is broken.
  • Offine improvements (Beta 2) - We've signficantly improved the experience going offline and integrated the tfpt online capability into the IDE for going back online.
  • Extranet support for the TFS Proxy - allowing you to access a local TFS proxy with a different set of credentials than the TFS server.
  • Command line help - You can now type "tf command /help" and get a console dump of the usage of that command. This is much more convenient than always being launched into the richer GUI hypertext help when you just want to remember what the options for a command are. You can still launch the GUI help by running "tf msdn". You can get a console dump of available commands by just typing "tf help".
  • Source Control Explorer refresh improvements - This includes less redrawing and reloading but even more important it enables updates based on changes made in other instances of TeamExploror or the command line. That's right, if you checkout a file from the command line, any instances of TeamExplorer you have running on the same machine will automatically refresh.
  • Query builder usability improvements - Drop down filtering based on current project, better MRU lists, column drag & drop, shift-click mouse based multi-column sorting, etc.
  • Attachments improvements - Save button, drag & drop for adding an attachment, multi-select for attaching files.
  • Tooltips on field names contain the field name used for querying.
  • Server side support for deleting work items & work item types (Beta 2) - We didn't have time to do client UI support for it but we plan to release a Power Tool that will take advantage of the new server side feature.

The above list is only what has been flagged as "new" (some of which won't be available until beta 2). See Brian's original post for a complete list of all features.