Category Archives: VSTS

Canberra VS ALM – July Meeting

This month see’s VS ALM MVP Anthony Borton visiting sunny Canberra on the 7th to present on one of the great test automation features in the Visual Studio ALM suite.


0810 – 0830: VS Breakfast

Share a bite to eat with the Canberra VS ALM group. Bring your Visual Studio and TFS queries and triumphs and share them! Quiz your peers on how they are getting the most out of Visual Studio and TFS, and maybe pick up some ideas you can take to work with you.

0830 – 0930 : Session – Coded UI tests in Action

As developers, it is easy to focus our testing efforts on unit tests and leave the rest to dedicated testers. Learn how this has changed with the new Coded UI Tests in Visual Studio 2010. Now we can create automated UI tests in code and have them run as part of our automated builds. In this session you will learn how to write effective and maintainable Coded UI tests and increase the quality of your application.

About the speaker

Anthony Borton is the lead ALM Consultant/Trainer for Enhance ALM Pty Ltd, an Australian consulting and training company specializing in Application Lifecycle Management and Microsoft Visual Studio. He has been working with Visual Studio Team System full-time since 2005. Anthony is a Microsoft MVP (Visual Studio ALM) and Australia’s first Professional Scrum Developer Trainer. He is also the president of the QLD ALM users group and maintains a blog at

Head to to register for this event!


Code Analysis in Team Build 2010

Code Analysis provides an executable set of rules that can be checked during a build to ensure standards and practices are being adhered to during development. This functionality is a great addition to a team build, and the tools required come as part of the Team Build Agent 2010 installation. Recently I’ve been doing some digging into how the Code Analysis is setup and triggered during a build.

Configuring Code Analysis

The first step to having code analysis run as part of your team build is to configure the rule sets and execution of analysis during the build of your project files. To do this, right click your project file and bring up the properties interface. Go to the Code Analysis tab and check the Enable Code Analysis on Build check box. This defines a constant that MSBuild will use to determine if the analysis should be run or not. You then need to pick your rule set, which can be set in two places. Firstly you can set it on the projects you want to run analysis against individually.

Project Properties

Configuring code analysis in project properties

This will get you started with Code Analysis, but once you turned on the analysis there must be a better way to get a view of the rule sets across the board for your solution right? If you right click your solution file and open up the properties interface, then click the Code Analysis Settings item you’ll see something like this:

Configuring rule sets in solution properties

Configuring rule sets in solution properties

This will give you a nice view of the code analysis rule sets for all of the projects in your solution. Something to note here is that the rule settings can be chosen on a per configuration basis. You can also use the ‘All Configurations’ option to set them across the board.

Once you’ve enabled Code Analysis and picked a rule set you should be able to run a local build and see a set of warnings shown for those rule violations that exist in your code. We’ve now got code analysis in our local build!

Code analysis warnings

Code analysis warnings in local build

Configuring Team Build to execute code analysis

Having local code analysis configured is a great place to start. Adding support for executing the code analysis in Team Build is the next step on the road to ensuring consistency in code. Setting up code analysis is really quite simple in the default build template.

First open or create the build definition you’d like to run code analysis in. Once you’ve got the Build Definition screen open, head to the Process tab. On this tab, you should see a parameter in the Basic group titled ‘Perform Code Analysis’. The default value here is to use ‘AsConfigured’ which will ensure execution for those project files that specify the code analysis constant with the rule sets defined. You can also turn it on with an ‘Always’ setting, or off with a ‘Never’ setting.

Build Definition

Configuring code analysis in your build defintion

How does code analysis get run?

There are a lot of good posts on how FxCop itself works, so I won’t cover it here. I also won’t cover writing custom rules or custom rule sets.. What I will cover is how it gets called during part of your Team Build.  My images here are based on the default template, so the activities used are all included in the standard install.

The settings for Code Analysis are passed into the executing build workflow as arguments. You can check these by opening the XAML, and clicking the ‘Arguments’ button at the bottom of the workflow designer.

Build Arguments

Build arguments on workflow designer

The list you see are the arguments defined for the workflow as a whole. If you’d like to see the arguments scoped to a specific activity, use the ‘Variables’ button next door.

If you start with a collapsed view (recommended) you’ll need to navigate down the activity tree to locate the Run MSBuild for Project activity which is an instance of the MSBuild activity. If you click this activity and open your properties window you’ll see that the activity accepts a  ‘RunCodeAnalysis’ parameter which is bound to the ‘RunCodeAnalysis’ argument specified for the build workflow.

Activity Configuration

Properties as configured for MSBuild activity

Pretty simple so far right? Time for some reflectoring to see what actually occurs here. Once we’ve loaded the Microsoft.TeamFoundation.Build.Workflow assembly into reflector we can navigate through the Activities namespace and locate the MSBuild activity. Once there we’ll a look at what exists inside. What you’ll see is pretty much what you’ve seen in the properties dialogue in Visual Studio. Lots of properties to allow the configuration of the build call. What you didn’t see in Visual Studio was the list of helper methods used inside the activity. There’s one particular method we’re interested in here which is titled ‘GetFxCopPath’.

Reflected MSBuild Activity

Content of the MsBuild activity viewed in Reflector

If we disassemble this method we’ll see that the method checks a registry key to find the FxCop executable path and returns that to the caller.

GetFxCopPath Dissasembled

GetFxCopPath Method Content

Digging a little deeper into the activity we find it utilises an internal code activity known as GetCommandLineArguments. This activity contains the following code snippet in its execute override:

GetCommandLineArgs Snippet

GetCommandLineArgs method content

This code sets up the execution of Code Analysis based on our build and project settings, and the path to the FxCop executable that was located via the registry key earlier. From here on, code analysis is run as per the normal MSBuild process based on these settings we’ve provided.

Known Issues

Unfortunately due to a bug discovered very late in the release cycle the install for Code Analysis does not execute on x64 build servers. This means you won’t see code analysis running despite correct configuration. The work around for now is to install a Visual Studio SKU that includes Code Analysis on the build machine to get the FxCop installation.


Making use of Code Analysis during a Team Build is a great way to help ensure a good level of consistency across your code base. Armed with this article, and some knowledge of how FxCop inspects code and applies rules you should now be ready to incorporate this useful tool into your automated build process.

Canberra VSTS User Group – March 2010 Meeting

March sees a slight break in schedule, with the Australian ALM conference in April we’ve decided to move the next meeting forward a month. This means our next meeting will fall on Wednesday, March 10th. The details are below:

0810 – 0830: VSTS Breakfast

Share a bite to eat with the Canberra VSTS group. Bring your VSTS queries and triumphs and share them! Quiz your peers on how they are getting the most out of VSTS, and maybe pick up some ideas you can take to work with you.

0830 – 0930 : SessionVisual Studio 2010 Tips and Tricks
Ducas Francis – Senior Consultant for Readify

Are you looking for an excuse to move to Visual Studio 2010, or do you simply want to know how to make the most out of an amazing new IDE…? Come see some of the cool new features in the latest release of VS2010 that can help you increase your productivity as a developer. You might even walk away with some insights into features you didn’t realise already existed. Just remember, ReSharper is a dirty word!

Thanks to the support of Microsoft, this month we have copies of Windows 7 Ultimate to give away! To go into the draw all you need to do is hand in your speaker evaluation form, with the winners being picked at random from the submissions.

Head here to register your attendance, and sign up here to get notified of upcoming meetings/news!

Visual Studio 2010 Quick Reference Guidance

Have you ever asked or been asked “Can you tell me about TFS or VS in 5 minutes?”. Did you struggle to fit all that content into an elevator pitch? Struggle no more!

Thanks to some great work by the Visual Studio ALM Rangers, there’s now a set of quick reference guides that provides a fast way to identify the answers to core questions about the VS and TFS ecosystem. This pack contains guidance on each of the roles supported by the VS ALM products, info on how the products transition from 2008 to 2010 and some great posters to hang around your workplace as reference points.

So if you’re looking to answer a “What is…”, “What is new in…” question or just need a quick reference sheet check out the codeplex project and download the guidance!

Canberra VSTS – February 2010 Meeting

0810 – 0830: VSTS Breakfast

Share a bite to eat with the Canberra VSTS group. Bring your VSTS queries and triumphs and share them! Quiz your peers on how they are getting the most out of VSTS, and maybe pick up some ideas you can take to work with you.

0830 – 0930 : Session Microsoft Lab Management
Mitch Denny – Chief Technology Officer, Readify

Mitch Denny has been working with Team System since early alpha versions in 2004. Since then Mitch has helped establish the ALM practice within Readify and has personally implemented Team System at many clients around Australia. Mitch is a VSTS MVP and now serves as the Chief Technology Officer at Readify establishing high performance project teams using Microsoft’s latest tools and technologies

In this session Mitch will introduce Visual Studio 2010 and Team Foundation Server 2010 then move on to demonstrating the advanced Lab Management features in the new product. In this session you will learn how an MTLM environment is structured and the various techniques you can use to get value out of the tooling.

Remember to submit your speaker evaluations at the end of the session for your chance to win a JetBrains ReSharper licence!

You can now register for this session at

2010 – off to a great start!

Saturday morning (AEDST) I logged in to my email to check what had arrived overnight. What I wasn’t expecting to find was an e-mail informing me that I’d been awarded Microsoft MVP status! It was quite a shock – as I didn’t even know I’d been nominated, but most definitely a pleasant one.

I’d like to take the opportunity now I’ve had time to recover a little to say thanks to a few people who have contributed to my progress over the last couple of years. Thanks go to Tatham Oddie and Paul Stovell for talking me into (read: signing me up for, then telling me about) my first presentation back in 2008. Anthony Borton for his invaluable mentoring that lead to the re-launch of the Canberra VSTS User Group and all the speakers both past, and future that have graced or will grace the podium at the Canberra VSTS UG. A thanks also to the guys at Readify who have always, and will continue to drive me to work hard so that I can keep up with some of the most talented and passionate IT professionals in the country.

It is in no small part that you have influenced and assisted me, and I am very proud to be both part of both Readify, and the MVP community!

Canberra VSTS User Group – October Meeting

0810 – 0830: VSTS Breakfast

Share a bite to eat with the Canberra VSTS group. Bring your VSTS queries and triumphs and share them!
Quiz your peers on how they are getting the most out of VSTS, and maybe pick up some ideas you can take to work with you.

0830 – 0930 : Session – Using TFS in High Performance Teams

Tatham Oddie – Senior Consultant at Readify, Technical Lead at and an ASP.NET MVP presents a session on his experiences with working in a high performance team with TFS. In his own words…

The redevelopment of, Australia’s largest e-commerce site, was a relatively typical IT project; short deadlines, massively changing scope, and a high level of resource churn. Come along to this month’s Canberra VSTS Breakfast to hear how TFS made the delivery of this project possible.

We’ll discuss the development processes we used, how we extended TFS to enable these processes and the myriad of lessons we learnt along the way. Some of the things we’ll cover are:

  • Empowering developers & testers to work together
    • TFS deployer
    • Environment pooling
  • Decoupling deployments from sprints
    • Branch strategies
    • Rapid & Regular delivery
    • Flickr: “10 deployments a day”
  • Work Management
    • What we customised and why
    • The life of a Product Backlog Item

This is a session not to be missed! Register now at