Visual Studio Team System (VSTS) Blog - by Neno Loje

Team Development and Software Quality with Microsofts ALM platform - since 2005

News

Recent Posts

Community

Tags

Email Notifications

VSTS Blogs

VSTS Sites

VSTS Community

My Other Blogs

German VSTS Websites

Archives

Disable auto-connect to TFS on VS startup

When starting Visual Studio it automatically tries to connect to your TFS, which can be very annoying if you work offline. You will probably see:

TF30331: Team Explorer could not connect to the Team Foundation server ...

You can turn this auto-connect behavior off by setting the following files in the registry:

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\TeamFoundation
"AutoLoadServer" = 0

Zero means do not reconnect automatically. 

Source: http://blogs.msdn.com/hippietim/archive/2006/03/14/551320.aspx

Downside: you now always have to manually connect (from Team Explorer’s toolbar)

Download .REG file: NoAutoLoadServer.zip

P.S. The Team Foundation Power Tools (TFPT) include a feature called Tweak UI which offers a checkbox to set this registry key – however in the October 2008 version it has a bug (creaing a string value instead of DWORD) and therefore will not work.

TSWA: Report view not showing all work items

By default Report View shows 100 work items only. If you have more than 100 work items in a query and you use Tools » Report View to prepare the list for printing you might notice that not all work items are shown on the report.

Here’s what Hakan Eskici, the father of Web Access, has to say about this:

There’s a limit to the number of work items we display in the “report view” for performance reasons. By default, it’s set to 100, but you can increase this by changing the following line in the web.config file:

<maxWorkitemsInReportList count="100"/>

Enjoy!

Cannot download attachements from Work Item Web Access

Solution provided by Hakan Eskici from Microsoft:

If you are using the WIWA feature in the latest TSWA 2008 SP1, you may notice that it’s not possible to download attachment files from the work item window.

As a workaround, you can edit Wiwa\UI\Pages\WorkItems\DownloadAttachment.aspx and modify the page directive to fix this by adding the HasPermission attribute:

<%@ Page Language="C#"
        AutoEventWireup="true"
        MasterPageFile="~/UI/Masters/Window.master"
        Inherits="Microsoft.TeamFoundation.WebAccess.UI.Pages.WorkItems.DownloadAttachment"
        Codebehind="DownloadAttachment.aspx.cs"
HasPermission="true" %>

Source: http://blogs.msdn.com/hakane/archive/2009/02/13/fix-wiwa-cannot-download-attachments.aspx

Naming Restrictions for Team Foundation Server

Naming Restrictions for TFS

If you ever had questions like:

  • How long is the team project's name allowed to be?
  • How many levels may an work item area hierarchy have?
  • Which characters are allowed in build type names?
  • What is the maximum supported size for work item attachments?

Those are answered by the MSDN topic: Naming Restrictions for Team Foundation Server

Unable to publish test results from Visual Studio to TFS

Error message similar to:

username@servername (mailto:username@servername) 2008-10-13 2:21:50          0.28 MB            10/13/2008 3:19:14 PM    Failed    Access to the path '\\DropFolder\Buildname_20080723.3\TestResults\fd8883e0-2153-44c6-8671-6d6db460c4a8\uesrname 2008-10-13 _02_21.trx' is denied.

Cause: Permission issue

A Workaround can be found in the KB article 958726.

What are Test Name, Test Id, and Test Path used for?

If you create a work item out of a test result like this…

Rightclick test result > Create Work Item

… the three test fields get populated by Visual Studio:

Test Name, Test Id and Test Path point to the originating test

Read all details here: http://msdn.microsoft.com/en-us/library/ms194965.aspx

Hotfix available: The Create Unit Test dialog opens up empty
Visual Studio Team System 2008 Development

Did you ever experience one of the following behaviours:

  1. The Create Unit Test dialog opens up empty, and no interfaces are shown in the list
  2. Clicking on the Code Coverage Tab in the .testrunconfig file makes the dialog box disappear.

A hotfix was made available by Microsoft.

Read the KB article 962866.

Using TFS to develop custom SharePoint applications (revised)

TFS and MOSS - a great team?The first article is created during a real world customer engagement and answers dozens of frequently asked questions and how-tos in a real world context vs. theoretical discussions. The 2nd package addresses very common questions around setting up and using TFS features for a MOSS development project.

VSTS Rangers - SharePoint Server Custom Application Development: Document Workflow Management Project
Read about the real-world design, construction, and deployment of a custom SharePoint Server 2007 application to a mid-market enterprise customer using Team Foundation Server as an ALM platform.

VSTS Rangers - Using Team Foundation Server to Develop Custom SharePoint Products and Technologies Applications
Learn how to use TFS to support your SharePoint application development, and provide an integrated development environment and single source code repository for process activities, integrated progress reporting, and team roles.

Additionally to the existing guidance from Patterns & Practices the two teams worked together to align these stories:

patterns & practices: SharePoint Guidance

The SharePoint Guidance contains a sample implementation of an intranet application based on SharePoint Server 2007 that demonstrates solutions to many ALM challenges.

Setup up an e-mail notification on other user's check-ins
  1. Open Alerts Editor (required TFS Power Tools to be installed locally).

    Alerts is part of TFS Power Tools by Microsoft

  2. Create new alert.

    Create a new alert to be notified by e-mail when something happens on the server.

  3. Choose “Check-In of a specific file happens”:

     A check-in alert gets fired when someone check-ins. 

  4. Enter a name for the alert subscription, the destination e-mail address, desired team project name ($/Teamproject), if applicable, as well as your account name (to be excluded).

    The Alert Definition Editor

  5. The “Filter Expression” (2nd tab) looks now similar to:

    'Artifacts/Artifact[starts-with(translate(@ServerItem, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz"), "$/playground")]' <> null AND "Committer" <> 'TFS\neno'
Tool for creating direct links to TSWA

Buck Hodges from Microsoft blogged about all the possible links you can construct to point to TSWA pages.

For example the following URL opens the Work Item Editor:

Open the existing work item with ID 1234: http://mytfs:8090/wi.aspx?id=1234

To make it simple I created a small tool that helps you construct those URLs in an easy way:

Team System Web Access Link Creator

You can download the source from here:

File Attachement: WebAccessLinkCreator.zip

Reports for measuring TFS performance

Monitoring TFS performance with reportsGrant Holliday, who runs the busiest TFS at Microsoft, posted 6 handy reports you can easily import into your TFS to monitor system performance.

"We have a responsibility to ensure that the server is performing as expected and to identify any efficiencies that can be made in the server or the tools.  To do this, we have created a number of reports that we use ourselves and make available to our own users."

Link: Read the full story and download the Report Pack.

 

 

Measure TFS Performance

Discover users without Visual Studio SP1 installed

Far too often people install Visual Studio SP1 before Team Explorer 2008 and therefore TE remains unpatched in the RTM state.

Luckily the ambitious TFS Admin can use the TFS Server Manager from the Power Tools package (TfsServerManager.exe in the Power Tools folder) to find those users without SP1:

Check for VS 2008 SP1 from the server

Open "Completed Requests" in TFS server manager.

Open Completed Requests

Choose "devenv.exe, 9.0.21022.8" (= RTM), devenv.exe, 9.0.30729.1 stands for SP1.

Choose devenv.exe as application

Click "Run Query" and look at the User and Client IP columns to identity your colleagues:

Run Query 

Done!

Hotfix for Team Build 2008 SP1: Reducing project-to-project references in build log (KB958845)

From Aaron Hallberg blog:VS08-TeamSys-TFS_v_rgb_2

[…] change in TFS Build SP1 which reduced build log noise by cutting out the build steps for project-to-project references […] the fix in SP1 didn't actually fix the problem, at least not completely.

[…] As such, if a project was referenced by 10 other projects the fix in SP1 would reduce the number of spurious build steps from 10*3 to 9*3 rather than removing them altogether.

A hotfix is finally available that will address the remaining parts of the problem […]

VSTS MVP colleague Mathias Olausson reports:

“before SP1 the build time was about 2h 30 min, with SP1 build time in average 65 minutes and with the build hotfix we’re now down to less than 40 minutes. The build log has changed from 5500 lines down to 550.”

Download hotfix: TFSBuild TargetsNotLogged property fails to cut down noisy builds

Additional Info: KB article 958845

Security Update for TSWA 2008 SP1

protected_83f8084f-8b20-45d5-8b17-67b0b449e38cFrom Hakan Eskici's blog:

A security issue has been identified with Team System Web Access 2008 SP1 and we have recently published an update that fixes it.

Installation Notice

Please note that this is a full release, so you will need to uninstall any existing versions of Web Access before installing this update.

Update: Instructions to patching your installation without the need to uninstall/reinstall TSWA)

Update #2: KB article 961267 is now available.

Determining if the update is installed

Take a look at the About page (Help > About) in Web Access.
The version number will be 9.0.3275 for TSWA 2008 SP1 Update.

Download: Visual Studio Team System Web Access 2008 SP1 Power Tool

How many users can Team System Web Access support?

A: Microsoft posted a white paper on this.

TSWAScalability

From the whitepaper:

"Test results indicate that Web Access starts to hit the upper limits once the total number of work item objects in the memory is around 180. This translates to approximately 100 concurrent users with typical usage patterns."

"Test results indicate that Web Access can support up to approximately 500 users." (working with a minimum amount of data)

Download: Team System Web Access 2008 Scalability Limits White Paper

VSTS Whitepapers by Microsoft

Planning

Installation, Configuration & Administration

Requirements Management

Version Control

How TFSDeleteProject Works

There are some areas where data may remain behind after you use TFSDeleteProject.

  • The TFS Warehouse is untouched. In order to remove the data from the warehouse, it must be rebuilt. (It is important to notice that, when the warehouse is rebuilt all the historic build data that has been trimmed from the system will be removed.) Rebuilding the warehouse is accomplished using the command SetupWarehouse. For more information, see SetupWarehouse.
  • The build drop locations (i.e., the location where the build binaries, build log files, and test results log files are published during the build process) are untouched. Removing the build drops must be done manually.
  • Any work item tracking metadata that is shared between projects will not be deleted.
  • The version control shelve set may not be deleted if there is code in the shelve set from multiple projects.

Read the full story by Aaron Block.

Download: Visual Studio 2008 Project Template for TFS Utilities

If you develop small utilities for Team Foundation Server a lot you might want to save some time and use a project template (see bottom for file attachment) that already comes equipped with the correct references to the Team Foundation Object Model (Microsoft.TeamFoundation.*.dlls) as well as the most important using statements and a few lines of code to get started.

Installation

Copy the ZIP file to {MyDocuments}\Visual Studio 2008\Templates\ProjectTemplates.

Usage

Create a new project and select “TFS Utility” from the “My Templates” list.

TFS Utility Project Template

The template creates a new Windows Forms application with references to the Microsoft.TeamFoundation.*.dlls (btw: the C# compiler gets rid of all references that were not used in the project during compilation)…

References to Team Foundation Object Model 

… as well as a a few using statements and some code to start from.

Generated code in Form1.cs

Happy TFS tool development!

 

Download: TfsUtility.zip

Specifying a user upfront or: How is the developer supposed to know who will be the responsible tester?

In a small team this sounds like oversize, but in mid-sized large teams it's common that you do not know who is going to be the tester.

Looking at the Bug workflow from MSF Agile:

  1. while "Active" the project lead decided if and when the bug is going to be fixed and assigns it to the responsible developer.
  2. between "Active" and "Resolved" is where the developers implements the fix.
  3. between "Resolved" and "Closed" is where the tester verifies the fix.

MSF Agile Bug workflow

When the developer finishes coding he changes the state from "Active" to "Resolved", e.g. by checking in and associating the changeset with the work item.

But by doing so the work item is still assigned to him. In our scenario he doesn't know who will be the responsible tester to verify the fix. So who knows?

The project lead might have that information. So either we assign it back to the project lead to make him assign it to as tester or we make the project lead specify the tester upfront (with the ability to change it afterwards if necessary).

In this example we'll implement the second approach.

Objective

Ask for the Tester when creating the bug and automatically u.se it for the transition from "Active" to "Resolved"

Required Work Item Customization

Step 1: Add a new string field to hold the tester
In this example we will make it a required field (<required/>) and ensure that it contains a valid user (<validuser/>).

<FieldDefinition> type="String" name="Tester" refname="TeamSystemPro.Samples.Tester">
  <REQUIRED />
  <VALIDUSER />
</FieldDefinition>

Step 2: Add a rule to the transition from "Active" to "Resolved"
Automatically copy the value of the tester field to the Assigned to field.

<FieldReference refname="System.AssignedTo">
  <COPY from="field" field="TeamSystemPro.Samples.Tester" />
</FieldReference>

Result

When creating a new bug it's now required to select a Tester before it can be saving.

Creating a new bug requires a tester to be specified

When choosing "Resolved" for the state "Assigned to" will be automatically filled with the contents from the "Tester" field.

Transitioning to resolved copies the tester to the Assigned to field

The history correctly shows the change in the "Assigned To" field from the developer (here: "Neno Loje" to the tester (in this case: "Administrator")

History displays the change in Assigned to field

Happy Customizing!

Using TFS for non-development projects

Team Foundation Server is easily customizable and equipped with a general purpose workflow or state machine. So you might ask yourself: why not put a non-development or rather related process in TFS instead of using separate software.

Showcase #1: Lead Management

AIT_TeamSystemPro_Team_klein_120x58Since here at AIT TeamSystemPro Team we are TFS consultants we decided to not use a commercial CRM tool for managing our leads but rather customize a team project in TFS for this matter.

Here are a few impressions of the experience:

Leads in Excel 

Work Item queries:

Work Item Queries for our Leads

Work Item layout:

Leads - Work item Layout

in Outlook (via TeamCompanion)

Leads in Outlook

Leads in Outlook (2)

The pretty simple workflow behind it:

lead workflow 

Showcase #2: Customer Support

Needless to say that the TFS support that we offer is tracked using work items as well:

Support Case work item

Customer Support Queries

Showcase #3: List of managed TFS instances

Every TFS instance that we manage has a corresponding record:

TFSInfo7880

Your Feedback

Do you have an interesting idea or have you used your TFS to support a non-dev related process? Feel free to leave me a comment or use the contact link – thanks!

More Posts Next page »