How do I find stuff in TFS 2010?


The other day I was coaching a colleague and I got the excellent question about how to find stuff in TFS 2010. So I explained to my colleague about some of the different ways you can find stuff and realized that this would be an excellent and hopefully informative post for me and others.

Scenario 1: you know the Id of the Work Item you’re looking for

If you’ve ever worked with TFS for a while you’ll (hopefully) start to memorize (unconsciously) the unique Id’s for the tasks, bugs, user stories, test cases e.t.c. that you work with. If this is your case then you have 3 very fast ways of accessing these Work Items fast.

Inside Visual Studio

  1. Right-click the Work Items node and choose Go to Work Itemimage
  2. …enter an Id
  3. and wooops there it is.

Or if mouse clicking isn’t your way of life add a keyboard shortcut that does the same thing as shown below:

Inside the Team Portal and Team Web Access

On your Team Project Portal you should have a textbox that will do the same as the Go to Work Item above inside Visual Studio. It will look something like this:


The exact same textbox is present in Team Web Access and look like this:


Scenario 2: you don’t know the Id of the Work Item you’re looking for

Let’s pretend that you don’t remember your Id’s or perhaps you’re a new team member on an ongoing Team Project, what do you do then?

Well you could go through all of the work items and search for the ones you’re really interested in Ler or you could search for Work Items. This is in my experience a somewhat unknown functionality that I would really love to have inside Visual Studio but if you go your Team Web Access you can actually search for words in title or description fields as shown below:


Scenario 3: you need to filter out an massive amount of Work Items

The best way to find, filter and structure you Work Items is to create good Team Queries, and I will not go into details how you accomplish this but I will give you a great tip.

  1. Take an existing Work Item Query and choose Edit Query
  2. Change it the way you want it
  3. Save it as your own Work Item Query or as a new Team Query (use folders to create even better structure)

Another great tip is to open your Work Item query in Excel and then use the power of Excel to filter stuff.


Scenario 4: use the power of search in SharePoint

The best way to find information in SharePoint items and in documents on your Team Portal is to use the awesome powers of SharePoint Search. Here is a sheet explaining some of the cool features in the box.



I don’t want to write comments or run code coverage on autogenerated code

The “warning CS1591: Missing XML comment for publicly visible type or member” issue

You’ve created a WCF service proxy and you’ve XML documentation turned on like the picture shows below.


Then you most likely will have a lot of warnings the next time you build your project like so:


Don’t despair the solution is close.


Find the Reference.cs file if you added a Service Reference manually or if you auto generated the Service Reference using the “svcutil.exe” utility open up the generated class.

Add the following line of code in your namespace:

#pragma warning disable 1591 //Disables CS1591 Warning


Auto generated code has lousy Code Coverage

Then you’ll be left with the issue that your auto generated code has lousy Code Coverage, if you haven’t written any tests against it that is. The question if you should write tests on auto generated code or not I leave it up to you. I’ll leave at that with the cowardly answer “it depends” Ler The before picture might look like this:


Notice how the auto generated namespaces are listed in Code Coverage.


This is as easily fixed as the XML Warning. In the file where you have the auto generated code use search and replace to add the


attribute to every class.


Finish things off with a Edit->Advanced->Format Document to get a nice formatting and your good to go!


Try compiling and watch as your code coverage goes up!