Editing a Build Process

If you want to edit your build process and utilize some of the custom activities in the  Community TFS Build Extensions. You may be finding it tough to drag the activity into your Workflow. Or Intellisense may not be working like you saw in that demo. Below are the steps to help you create a project to store your custom build processes and easily edit them.

First Download the Community TFS Build Extensions and copy them into a folder in source control. I like to put them in a folder under the BuildProcessTemplates folder created from your Process Template, called Custom Activities.

For example: $/ObjectSharp Projects/BuildProcessTemplates/CustomActivities

You need to make sure the build server knows where to find these so Change the Build Controller property Version control path to custom assemblies to this location in source control. You can get to it by right clicking on the Builds node in Team Explorer and selecting Manage Build Controllers. Select the Controller and click the properties button.

Make a copy of the Build Process Template that you want to edit and make sure it’s in the BuildProcessTemplates folder under source control.

  • Add the Custom activities to your toolbox.

in Visual Studio select Tools | Choose Toolbox Items… from the main menu.

On the System.Activities Components tab browse for the TFSBuildExtentions.Activities.dll and add it.

  • Create a new Class Library Project

Delete the Class1.cs that gets created.

Add the following references to the project:

From the .Net tab on the Add Reference dialog:

From C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies
From where ever you installed it on your machine

  • Add the Build Process Template to the project.

Right click on the project and select Add | Existing Item… from the context menu.
Navigate to the build process template you want to edit 
Click on the arrow next to the add button to select Add As Link

Now you can work on your build process in place from within a project so you have all the references you need to drag activities in and have the benefit of intelitrace.

Creating a Custom Link Tab for your TFS Work Item

Each work item in TFS contains an All Links Tab where you can see all the links to this work item grouped by relationship type.

There are other tabs that just show specific links like Implementation, Change Requests, Test Cases. These tabs are filtered to only show certain types of relationships and the work items that can have this relationship.

It’s very easy to create your own Tab that shows specific links and the work item types that you want the user to include.

As an example lets create a Review Tab on the Requirement work item in the CMMI Process Template so we can see the Design Reviews associated to this requirement.

Open up the CMMI process template using the Process Template editor that comes with the TFS Powertools.

Lets create a custom link type to be used for Reviews. From the Process Editor select Methodology | Work Item Tracking | Link Types and click the new Button. Fill in the New Link type to represent a  Reviewed By/Reviews relationship.

Save the Link Type and open the Requirement Work Item type editor.

In the Layout tab right click on the TabGroup node and select New Tab Page from the context Menu. You can right click on that new tab page and select Move Up or Move Down to change it’s order in the Tab control.

Change the Label on the New Tab Page to Reviewed By.

Right click on the Tab Page – Reviewed By and select New Control. Fill in the Control property grid with label, name and type information.

Now select the Control Settings field and click on the button in that field with the ellipses.

From here you can control the links that can be added and viewed with this control.

There are three filters that can be applied.

Work Item Type Filters: Allows you to select the type of work items the can be selected. You can choose to Include All work item types or Include/Exclude a subset of them. For our example we will select Include and check the Review Work item Type.

Work Item Link Filters: Allow you to force a specific work item link type. You can include/exclude all or include/exclude a subset. For our example we’ll Include the new Reviewed By link type we created.

External Link Filters: These are for the non work item links. You can include or Exclude the following external link types.

Fixed in Changeset
Result Attachment
Source Code File
Test Result
Workitem Hyperlink

See my blog entry on Requirements in TFS for an example on using the External Links.

For our example we will set this to Exclude All this way none of the external links will be allowed.

You can also select what columns you would like to show in the list of related work items. I’ll add Called By and Called Date to the selected Columns.

Now with a project created from this process template the Requirement will have a Reviewed By tab that allows users to add Reviews with the link type Reviewed By.


Visual Studio 2010 Feature Pack 2

Deb Forsyth posts lots of great information about TFS and it’s related tools for the Test community. She put up a post recently about the new Feature Pack for Visual Studio.

There is one feature in this Feature Pack that is particularly useful, the Coded UI Test Editor. If you have worked with Coded UI Tests you will know, although powerful the tooling around version 1 needs some maturing. We'll it’s already begun. When you create a Coded UI Test it generates a couple of files. The UIMap.uitest  which maps methods that manipulate the UI and assertions to the application under test, and  the Coded UI Test class which is really just a test class with test methods that call methods in this UIMap object.

Prior to Feature Pack 2, to make a change to the UIMap.uitest has not been easy you would have to have a good working knowledge of .net development. However, now we have the Coded UI Test editor. After you install the new Feature Pack open the UIMap file in your test project and an editor will open that allows you to see all the methods in your UIMap rename them split them out into other methods. It will also allow you to change an assertion as seen in the image below.

This is a welcome tool when writing automated tests using Visual Studio.

AzureFest Follow-Up Links & Videos

Cory Fowler stands beside the big screen in Microsoft Canada's MPR roomThis past Saturday December 11th, Microsoft and ObjectSharp hosted AzureFest, a community event to raise interest and learn a little bit about Microsoft’s cloud platform, Windows Azure.

My colleague Cory Fowler gave an introductory run down on the Azure platform and pricing, and then demonstrated for those in attendance how to go about Creating an Account and Deploying an Azure Application.

The best part, is that our good friends at Microsoft Canada offered $25 in User Group Funding for each person in attendance that followed along on their laptop to activate an azure account and deploy the sample application.

Now Held Over!

The even better part, is that MS Canada is extending the offer until December 31st online for anybody that goes through this process to activate and deploy a sample application online. We’ve got the instructions for you here and it will take you approximately 15 minutes to go through the videos and deploy the sample.

  1. Download the application package that you’ll need for the deployment here.
  2. Create an Azure Introductory Account (5 minutes). You’ll need
    • a Windows Live id. (if you don’t have one, click here for instructions)
    • a Valid Credit Card (don’t worry, in step 4 we’ll show you how to shut down your instance before you get charged).
    • navigate to www.Azure.com and follow along with these instructions
      Signing up for Windows Azure
  3. Deploy the Nerd Dinner Application (8 minutes)
    • follow along with these instructions
      Deploying the Nerd Dinner Package to Azure
    • email a screenshot of your deployed application showing the URL and the name of your user group to cdnazure@microsoft.com
    • Specify TVBug, Metro Toronto .NET UG, CTTDNUG, Architecture UG, East of Toronto .NET UG, Markham .NET UG, etc.
  4. Tear down to the application to avoid any further charges (2 minutes)
    • Tearing down a Windows Azure Service

Here are the slides from Azure Fest

Stay tuned here for the next part of our video blogs where we will review:

  • Deploying a SQL Database to Azure
  • Installing the Azure Tools for Visual Studio and SDK
  • Deploying ASP.NET Applications from within Visual Studio

Windows Phone 7 App Challenge: TFS Mobile Client

I have an MSDN Ultimate Subscription to give away to the winner of this challenge! The winner will have successfully built a showcase TFS Client for Windows Phone 7. I will accept entries until November 30th.

There are boundless opportunities for features and functionality. Creativity counts here, but to get you started, here are some ideas:

    • Build Server Status
      Would love to see the status of a given build type, the latest build, success/fail, the offending people who checked in code on a broken build. Would be nice to kick off a QA or Production build (or any type for that matter) from my phone once I’ve got the all clear from QA.
    • Iteration Dashboard
      What’s the status of the current build? What exit items are still open? What’s our current velocity? What’s the burn down look like?
    • Work Items
      Would love to edit a work item, reassign it to somebody else, close it, reactivate it, etc. Log a bug perhaps?
    • Opportunities with the Phone
      Being able to look up a work item owner, or build breaker in my address book and phone or email them seems obvious.


Remember the highlights of this challenge:

  • Entries due by Nov 30th. Email me some code including a link to video demonstration ideally. bgervin@objectsharp.com
  • Let me know if you are planning on entering. I’d be excited to provide some coaching and guidance along the way.
  • On the line is 1 year MSDN Ultimate Subscription. I think that is worth like a million dollars or something Smile
  • I’m sure you will also win a free date with a MS Developer Evangelist and be featured on the CDN Dev Blog.
  • I’m pretty sure you aren’t allowed to win if you live in Quebec or work for Microsoft or the Chinese government, but please don’t let that stop you from submitting an entry!

Gentlecoders, start your engines! Best of luck.

Toronto Code Camp 2010: Blendability Follow Up

This past weekend I gave a talk on “Blendability”; The ability to maintain and leverage blend design time compatibility with your WPF and Silverlight projects. Thanks to everybody who came out to the talk, we had some good discussions despite the oppressive heat in the room. You’ll find my slides above. As some of you have requested, here you can find my demos including the MVVM template that was used in the Blend 4 previews that demonstrates the behavior technique for calling methods on your view models.

Toronto Code Camp 2010: Ultimate Architecture Experience Follow Up

This is just a quick follow up post from my demo at the Toronto Code Camp last weekend. Thanks for everybody who came out.

In addition to my slides, here ere are a few resources that will help you learn more about the architecture tools in Visual Studio 2010 Ultimate Edition:

  • The .NET Pet Shop that I used as a sample is available for download.
  • Walkthrough: MSDN How-To’s on Modeling in 2010
  • Blogs: Cameron Skinner, Peter Provost and last but not least Chris Lovett who has some most awesome video demos and tips for dealing with large diagrams. He also provides some samples for those that are interested in learning more about Directed Graph Markup Language for creating their own diagram generators.
  • The Patterns and Practices Team has released a set of templated layered diagrams for various references architectures.

Toronto Code Camp Collateral

I just finished my two presentations at this year’s Toronto Code Camp. As is my standard, I have put my slides on Slideshare.net. They can be found at:

OData - http://bit.ly/akPCcH

Silverlight 4 Out of Browser - http://bit.ly/91xQwp

As well, the sample code for the Silverlight 4 talk can be downloaded here.

Architecture with Visual Studio 2010 At The Movies

This is just a quick follow up post from my demo at Visual Studio 2010 At The Movies last week. Thanks for everybody who came out, especially those from out of town.

I didn’t use any slides but I thought about recording my demo here. I may still get to that, but in the meantime, here are a few resources that will help you learn more about the architecture tools in Visual Studio 2010 Ultimate Edition:

  • The .NET Pet Shop that I used as a sample is available for download.
  • Walkthrough: MSDN How-To’s on Modeling in 2010
  • Blogs: Cameron Skinner, Peter Provost and last but not least Chris Lovett who has some most awesome video demos and tips for dealing with large diagrams. He also provides some samples for those that are interested in learning more about Directed Graph Markup Language for creating their own diagram generators.
  • The Patterns and Practices Team has released a set of templated layered diagrams for various references architectures.

Hierarchical Work Items

TFS 2010 has hierarchical work items. This is something that we have been waiting for and are very happy about. Along with hierarchical work items you also get two new query types.

Work Items and Direct Links - Which allows you to query for a work items with specified relationships.

Tree of Work Items – Lets you query for a work item and child work items.

For example if I wanted to return a list of User Stories and all the Development and Design Tasks to implement them it would look something like this.
















The result from this query might look something like this.


Lets say you have created tasks but have not assigned them to Requirements yet. In other words they have no Parent Work Item. Create a query something like this, so it shows Tasks and User Stories in the Parent role. 


The Result will show Tasks that were not assigned to User Stories yet.


Here’s the cool trick I wanted to show you.

By dragging the Task titled “Implement Movie Query” onto the User Story titled “Select Movie Time” it will automatically create the Parent/Child relationship. You can also reassign incorrectly assigned children to another parent.

Nice eh?