Configure Git for Visual Studio to use a proxy server


Unlike most features of Visual Studio, the Git tools do not (always) automatically pick up the Widows proxy settings, being dependent on a number of open source libraries which don't seem to be benefiting from the same Windows Proxy Auto-Detection.

This is a shame, really, but it doesn't make it impossible to have Git for Visual Studio to pick up a proxy server.

To configure your proxy server, you must  set an Environment Variable called "HTTP_PROXY". It follows the same configuration scheme as Team Explorer Everywhere. After setting the variable, restart Visual Studio if you had it open when changing the environment.

Most cross-platform applications will try to use this variable, if applications suddenly start to behave strangely, they might be under the influence of this variable. In my case I picked up such behavior in Calibre Ebook Management.

Enabling Requirement based suites for other work item types (without putting them on your backlog pages)


A few weeks ago a client asked me whether they could link test cases to the Feature and Epic work items and whether they could create a Requirements Based Suite for these work items in Test manager. And while investigating the new "Bug on the Backlog" feature of TFS 2013 update 4 I found that there is a bug preventing MTM from showing bugs for requirements based suites. This little trick works for both problems.

Initially I thought it would not be possible, The work items that would show up in MTM needed to be in the Requirements Category and that is also the category that governs which work item types show up on the Backlog. Since Features can't be both in the Requirements Backlog and the Feature Backlog, I initially gave up.

Then I got an email from Martin Hinshelwood with hint of where to look. The ProcessConfiguration.xml allows you to decouple the Requirements Backlog from the Requirements Category. With these items decoupled, it would be possible to stick any work item in the "Requirements Category" without them showing up on the Product backlog.

Enabling "Bug on the Backlog" feature for the Scrum template

See also: StackOverflow

TFS 2013 update 4 has been out for a few weeks now and one of it's features allows you to easily put Bug work items on the backlog. This feature is very useful for users of the MSF Agile and MSF CMMI process templates, but is not enabled for users of the Scrum template. Teams using the scrum template will see teh "TF400917" error message and the checkbox will be disabled:

This makes sense, since Bugs have always been on the backlog for Scrum teams. I did look into what's needed to enable this feature and if you have custom templates the following tutorial may be useful to you as well.

To make this work you have two options, one is to take an existing process template and edit it, the other is to edit your process template in a lice project. I tend to prefer the first, but the latter will work as well.

Agile Chair Game - Some alternate suggestions


If you've been at an Agile conference, been a Scrum Master for quite some time and joined an Agile meetup group (here in The Netherlands there are several), then you probably found that games can be very quick ways t energize any meeting and to drive learning through fun.

One game I've been doing a lot during Scrum Developer courses is a variation on the Agile Chair Game as described on Tasty Cupcakes.

Just to reiterate the goal of the game very quickly. Have the team learn quickly by failing in rapid succession and learning from their mistakes. The game drives short cycles, inspection and adaption and lays down a number of restrictions that they (initially) cannot work around (just like the real world does).

As I mentioned we've been doing a number of small changes to the game, so here's how we play it:

Amazons entry into the Dutch book market is not without issues...


Amazon has finally announced that it opened its digital book store in The Netherlands. Due to the protected pricing on books in The Netherlands that took way longer than many people hoped for. Like me, a  lot of fellow Dutchmen have found their way to the US Amazon Kindle store and have been reading away happily for years now, as long as you don't mind hacking around with Calibre and removing the DRM protection from other sourced ebooks, reading on your Kindle works just fine that way :).

I myself usually read my books in English anyway and thus order them directly through,

Now that the Dutch site has finally launched I went over to see if I'd switch my "Country of residence" on my Amazon account, but it looks like I'll be waiting to do that for a little while more. Why? Well let me tell you:

Amazon does not yet provide extended warranty on Kindle Devices
My Kindle Paperwhite was damaged on the plane back from Mumbai last week and the screen is no longer functional. I wanted to order a replacement device, but that is not (yet) possible directly through One used to be redirected to (and pay quite a bit of import taxes), but now it's possible to order through or

In the order now window Amazon offers you the option to extend the warranty and accident protected with another 2 years. It doesn't tell you at this stage that the warranty is not applicable to residents of The Netherlands.

I contacted Amazon support and they confirmed the option. It looks like Extended Warranty will be available in the future, but it's unsure if it will be in the next 30 days (extended warranty must be purchased in the first 30 days after receiving the Kindle).

The collection of books is miserable (if you read titles in their original language)
This is an interesting problem. If you've ever walked into a large Dutch Bookstore, you might have noticed the large US and UK imports section. Especially the Science Fiction and fantasy sections are often better stocked in their original language.

When you go to right now you'll find quite a few titles in Dutch, but all of the English titles I looked for were not available in my country. I can order them through (Amazon's biggest Dutch competitor), it's probably a licensing issue.

The Dutch books are a different story. All major publishers seem to be present, but a lot of the smaller publishers are not present yet.

You can't have a best of both worlds option
I don't really understand why, but it's not possible to be subscribed to two Amazon stores at the same time. Even though I can at present buy any ebook from and have it sent to my (now defective) Kindle, I can no longer when I activate the Dutch amazon store.

As long as I don't make the switch I can't order any books that were written by Dutch Authors, unless I order them in English.

Now that doesn't make any sense to a normal consumer. I suspect again that this is a legal and licensing issue, but that doesn't mean I want to understand it.

I'll stay with for the time to come. I'm hoping that they'll offer the same extended library of Kindle books in the future on either site.

Changes to the Scrum 2013.4 process template


In 2013.3 Microsoft did a number of massive changes to support Test Suites and Test Plans as work items. In 2013.4 only a few changes were made. There currently is no "upgrade my template" wizard, but you can always apply these changes manually.

A quick compare between the two template yields the following results:

C:\users\Jesse.Houwing\Desktop\Process Templates> tf folderdiff "Microsoft Visual Studio Scrum 2013.3" "Microsoft Visual Studio Scrum 2013.4 - RC" /recursive

Quickly comparing these different files shows the following changes:

ProcessTemplate.xml & Classification.xml & ProcessGuidance.html
Version and name changes only.

Backlog Overview.rdl & Velocity.rdl
There have been quite a few changes to the queries of these report. These make it quite a bit faster. You can use the TFS power tools to push it to your existing Team projects or you can manually overwrite the report in every place it has been deployed.

The introduction of the Bug Work Items and Microsoft.BugsCategory to support switching bugs from showing up on the product backlog. Add the following category:

<BugWorkItems category="Microsoft.BugCategory" pluralName="Bugs" singularName="Bug">
      <State value="New" type="Proposed" />
      <State value="Approved" type="Proposed" />
      <State value="Committed" type="InProgress" />
      <State value="Done" type="Complete" />

Bug.xml & ProductBacklogItem.xml
The removal of the BacklogPriority control from the work item form. With the Agile Tools now being part of the Standard features of TFS, it's no longer required for non-MSDN-subscribers to manually edit the BacklogPriority field. Plus, with the automatic regeneration of the field data, it was confusing to many users anyway. Remove the following line from both work item type definitions.

<Control FieldName="Microsoft.VSTS.Common.BacklogPriority" Type="FieldControl" Label="Backlog Priority" LabelPosition="Left" />

Removing Device Encryption from an LG G2 (International) running CM11

I decided to turn on Device Encryption on my LG G2 International yesterday. Boy was that a mistake! My phone hasn't been as unstable in years. And, as it turns out, once device encryption is enabled, it's quite a mess to turn it off.

Before I enabled I was running TWRP, but that turns out the be incompatible with the type of encryption Cyanogenmod uses (at least for the G2), and because it's incompatible it's quite a hassle to get anything flashed to the device.

I between force reboots I managed to copy TWRP to the /system partition of my phone, allowing me to flash it over the older version. This version *will* let you unlock your /data partition, but still was unable to format the data drive.

I ended up going to the adb shell and issuing make_ext4fs /dev/block/mmcblk0p35 (this block number is specific to the LG G2, if you have a different phone, make sure you locate the correct path to the userdata partition) directly to clear the encrypted partition, finally allowing me to boot back into my phone without a password. And finally returning to a stable experience.

Showing Test Results on the Test Case work item in Visual Studio and TFS Web Access


There are times you hear nothing about a topic for over a year and then suddenly 2 clients and an MSDN forum post come up with the same request: Can we show the test results in Team Web Access now that TFS 2013 contains the Web Based Test Management features.

And the answer (for now) is: no.Not with the out-of the box product. But as many of you will know, TFS is extensible in multiple ways, plus it provides an extensive API for accessing the data stored int he Team Projects.

MVP Mathias Olausson has combined these techniques and uses the WebBrowser custom workitem control with a small web application that uses the TFS Client Object Model to read the test results from the Project Collection database. This allows everyone to put the Test Results in the Test Case work item with ease.

Now that TFS 2013 Update 3 has made the Test Plan and the Test Suite a proper work item, it should also be possible to show the rolled up status for these in these work items using the same trick! very nice!
Until Microsoft puts this directly in the product this will work pretty well as a workaround :).

Effectively use StackOverflow as a contributor


A couple of colleagues asked me last week how I manege to wade through StackOverflow to find interesting questions. They also asked why I'm active on Stack overflow at all. Let's first dive into a couple of tips for more effective management of the incoming flow of questions and then I'll try to explain what I get from being active on forums like MSDN and Stack Overflow.

Building a .NET application using the GitUpgradeTemplate.xaml


Today I received a request which I first found strange. A team that migrated to Git, but still wanted to use their TFS 2008 era TFSBuild.proj. After seeing the investment made in that build file, I understood :).

So we though to simply use the GitUpgradeTemplate.xaml which is provided with TFS 2013 and be done with it. But you'll see that Team Build will kick off the build and will download your TFSBuild.proj as you'd expect, but it doesn't download your sources.

Your TFSBuild.proj needs to be updated with a few properties to make it work. The minimal project file is listed below:

<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="" ToolsVersion="3.5">
  <!-- Do not edit this -->
  <Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets" />


    <!-- Team Foundation Build Version - DO NOT CHANGE -->


    <!-- Set this property to true for Git build. -->


In your Build Definition make sure you're using the (rather unfamiliar) vstfs:///Git/VersionedItem/{TeamProject}/{Repository}/{Branch}/{Folder-Containing-TFSBuild.proj} as your Configuration FolderPath.

Codelens features and Visual Studio versions [Updated for 2013.3ctp1]


Update: Visual Studio 2013.3 CTP 1 Adds support for Git repositories!

If you're as happy with the new CodeLens features in Visual Studio 2013 ultimate as I am, you've probably found out that some of the features rely on server side features. This means that some Code Lenses only work when you are connected to the latest version of Team Foundation Server (2013). 

Even Visual Studio Online doesn't (yet) support Code Lens. The background processing it introduces on the number of Visual Studio Online accounts that are currently active on the service is not something that should be taken lightly. Given the tremendous value of Code Lens, I expect the server dependent lenses to be enabled in the months to come, there is a UserVoice suggestion you can track for this item.

Support for Git was added in Visual Studio Update 3 and now most indicators work also when using Git as your source control provider. Even cooler is that Codelens for Git also works with 3rd party Git hosters such as GitHub. Update 4 extends that even further. The best part is that for the Git lenses, it's not required to upgrade the TFS server, these work against your local repo and thus don't need server side processing.

CodeLens is currently only supported when editing C# and VB.NET. C++ (managed and unmanaged), Javascript, TypeScript and F# or any other file format are currently not supported.

LensTeam Foundation Server versionVisual Studio Online 3rd Party
≤2010 2012 2013
Test Status**yesyesyesyesyesyesyes
Tested By**yesyesyesyesyesyesyes
Authorsnonoyes*yes (u3)yesyes (u3)Git (u3)
Changesnonoyes*yes (u3)yesyes (u3)Git (u3)
Bugs update 1nonoyes*yes (u3)yesyes (u3)no
Work Items update 1nonoyes*yes (u3)yesyes (u3)no
Code Reviews update 1nonoyes*noyesnono
Code Health add-onyesyesyesyesyesyesyes
Incoming Changes update 3&4yesyesyesyesyesyesGit
Intellitrace update 2yesyesyesyesyesyesyes

* Works only when connected to your Team foundation Server.
** Supports MsTest, XUnit (requires latest adapter version) and NUnit.

If you have an idea for a new Code Lens, please submit your suggestion here.

I will update this table when new Lenses appear or when new Lenses are enabled on another Server, Source Control Repository or on Visual Studio Online.

Controlling whether CodeLens runs


Don't get me wrong, I just *LOVE* CodeLens, but I've found a few times where I want to control it's server jobs.

A few scenario's where I don't need CodeLens running for my Project:

  • The project is an archive and isn't actively used
  • None of the developers on the team have an MSDN Ultimate license
  • You're upgrading a massive TFS server and want to control which Project Collections are processed first.
I didn't actually know that there was an option to control Code Lens indexing until today, thanks to Mathew Aniyan.

To activate or deactivate the indexing at a Project Collection Level, you can use the TFSConfig CodeIndex command, as outlined here. You can get finer granularity by adding Ignore paths to the list.

To turn off for the whole collection use: 

tfsConfig codeindex /collectionName:DefaultCollection /setIndexing:off

To turn off for a specific team project use:

tfsConfig codeindex /collectionName:DefaultCollection /ignoreList:add $/ProjectName/*

This will allow you to reduce the amount of processing required after an upgrade by excluding old data and it can improve the performance a little should you have a TFS server which has been sized tightly.

Even though "tfsconfig codeindex /?" doesn't really explain this, one can use a wildcard at the start or end of the path:

Command: codeindex
Adding to or removing from the ignore list requires a valid path to be specified.
Wildcards ('*') are allowed as the first and/or last characters of the path.

Work item customization doesn't get reflected in Web Access (2012 and 2013)

In our company we have quite a few custom process templates for TFS, most of these have been around for quite some time and have been updated as new versions have come along. Recently I was asked by a number of people why their changes made to the Form Layout don't get reflected in TFS 2013 Web Access, and after taking them though all of the things to check (IIS Reset of the AT, clear work item cache etc), they still failed to show up.

So I started digging. First thing we found is that Web Access can get cranky if Custom Work item Controls are missing. Visual Studio will happily render a TextBox or DropdownBox so that you get some working UI, Web Access behaves slightly different; it just hides the whole control from the form. So if you're using any custom controls, make sure that they're installed on both the Web Access server and inside the version of Visual Studio you're using to change the process template. They should be listed and enabled on the Admin page:

There's a very funny 'bug' in the Power Tools Process template editor, it will not tell you that you're missing a control. It will simply show FieldControl in the UI, since the PreferredType isn't available from the Work Item Form Designer. Very annoying, so it took some actual XML digging to find items like these.

And then the second thing we ran into, is that many of our old work item definitions used to have more than one tags. One for Windows, one for Web. There's a number of very picky rules to keep in mind here and in general I feel that it's much easier to just have both use the same layout. Most the templates were created long before any of these rules were documented in blogs, causing all kinds of funny things to happen. Going back to a single layout makes it all a lot easier to manage.

A thing to look out for when using the Power tools is that again it doesn't show you everything. When you open a WIT that has multiple layouts, the Power Tools designer will only show you the *first* one. It doesn't even tell you that there are others.

Just a few lessons learned :S.

Book Review: Resharper Essentials - Or: Find your way around Reharper's Shortcuts


I received an ebook copy from Packt Publishing for an honest review, So here we go :).

I've been a long time, on and off user of Resharper. But it has taken me a long time to learn most of its features. Even today I still find little gems I never kew existed, it's like Visual Studio itself, which has so many features I've never even seen before.

This book quickly takes you through the most important feature area's of Resharper and teaches you the most important shortcuts. Ctrl-T, Ctrl-R, Ctrl-U, Alt-Enter, Alt-` and (Ctrl-)Alt-Ins. With those few key presses and an idea what they do you'r probably able to unlock all the hidden potentials of Resharper by paying attention to what is shown on your screen. Without those you might not even know what Resharper can do for you. The book showed me a few thing I didn't even know existed :).

Ask a developer for confirmation in a TFS checkin policy


A TFS checkin policy can normally only be dismissed by overriding the policy. There is no way to selectively allow a user to override one, but not another policy. And there is no way to interact with the user from the Check-in dialog using custom UI other than the message, you can't add your own check box or text box.

One of the policies I recently wrote warns the developer that he might be doing something stupid. We want our developers to be able to dismiss this warning, but we don't want him to override the work item attachment or the comment policy.

So we decided to add a way for the developer to dismiss the warning by double clicking the message.

Edward Thompson confirmed on StackOverflow that interacting with the user on the Evaluate method to be avoided. But the documentation mentions another event, the Activate method, which is called when the user interacts directly with the warning.

This is ideal for this situation. By double clicking the warning, we trigger the Activate method, show a warning and upon dismissal of the dialog save the result.

Now when the conditions for the policy changes, we reset the result and the policy will trigger again.

In order to allow a user to dismiss the policy, we added a configuration option to the policy which will allow this:

A sample UserOverridePolicy can be found on StackOverflow and our Multiple Branches policy implements this strategy as well.

I might even take this as far as allowing any policy to be nested in a generic UserDismissablePolicy in the future, similar to how the Custom Path Policy works.

Source: StackOverflow

Avanade partners with


As many of you probably already know, I became a trainer with for the Professional Scrum Developer curriculum a year ago, and now Avanade (my employer) and have partnered up to together improve Software Development!

Creating a Check-in Policy to warn when checking into multiple branches at once


Update: Project has been uploaded to GitHub.

One of the teams I work with recently had strange issues when they tried to merge their feature branches to the main branch. It turned out that one developer had accidentally misconfigured his workspace and was check-in in half of his changes in a solution in one branch and the other half of his changes into another. Looking at the version history things like these happened in the past as well and explained some of the issues they had been experiencing.

The team has learned it's lesson, but to prevent these kind of accidents in the future we're creating a check-in policy that flags a warning to the developer that he's doing something that is potentially dangerous.

The policy itself is very simple to build. Follow one of the existing walk-throughs to create the project  and make sure you use the correct CLR and TFS Client Object Model assemblies for your target visual studio version.

A check-in policy has an Evaluate method, which is where all the magic happens. To make sure you're only checking into one branch at a time, we request the BranchRoot objects and compare it against the server path of all the items selected to be checked in:

public override PolicyFailure[] Evaluate()
    if (PendingCheckin.PendingChanges.AffectedTeamProjectPaths.Length > 1)
        return new[]{new PolicyFailure("Checking into multiple projects at the same time", this)};

    var branches = this.PendingCheckin.PendingChanges.Workspace.VersionControlServer

    var groupedChanges = PendingCheckin.PendingChanges.CheckedPendingChanges.GroupBy(
       change => branches.SingleOrDefault(branch => change.ServerItem.StartsWith(branch.Properties.RootItem.Item)));

    if (groupedChanges.Count() > 1)
       return new[]{new PolicyFailure("Checking into multiple branches at the same time", this)};

    return new PolicyFailure[0];

I've placed the solution onto GitHub and might add a vsix at some later point.

Creating a custom check-in policy pack that works with multiple versions of Visual Studio.

Anyone who has ever tried to create a custom check-in policy for Visual Studio probably knows that the policy isn't specific to the TFS server version you're using, but to the version of Visual Studio that is connecting. This can be confusing for companies that are upgrading their Visual Studio, but not their TFS installation (or for people who've moved to Visual Studio Online).

You might be able to get away with using Binding Redirects in the Visual Studio ..config file (and in the .config file of any other process that might invoke the policy) as documented here. This essentially tells .NET to load a newer version of a dependent assembly and will trick your policy that was created for an older version of Visual Studio to load in a newer one. You cannot use this trick to load a policy created for a newer version of Visual Studio in a older version.

The official way to resolve this, is to create a different binary for each Visual Studio Version and register that binary in the corresponding config hyve.

Each of these projects will be very similar and in many cases you can reuse the same .cs file for each version of Visual Studio (as long as you're not using any API that was introduced in a later version.

Step one, is to create the right projects:

Visual Studio Project Type CPU .NET Version TFS OM Version Visual Studio Version
2015 Class LibraryAnyCPU 4.5 v14.0
2013 Class LibraryAnyCPU 4.5 v12.0
2012 Class LibraryAnyCPU 4.0 v11.0
2010 Class LibraryAnyCPU 4.0 v10.0
2008 Class LibraryAnyCPU 3.0 v9.0
2005 Class LibraryAnyCPU 2.0 v8.0

Step two is to add the right references to it;

From the Visual Studio installation directory find:
  • Microsoft.TeamFoundation.VersionControl.Client.dll
  • Microsoft.TeamFoundation.Client.dll
  • Microsoft.TeamFoundation.dll
You can find these in: C:\Program Files (x86)\Microsoft Visual Studio {VisualStudioVersion}\Common7\IDE\PrivateAssemblies\.

Update:  For Visual Studio 2015, instead use the NuGet package.

Step 3, is to add a new class to it and have it inherit from PolicyBase.

Step 4, mark the class as [Serializable()].

If your code doesn't use any special features of the more recent versions of the Client Object Model, you can use "Add As Link" to add the same .cs to all the projects you've created in your solution.

Step 5 to each project add a compiler constant for the visual studio version you're targeting. This allows you to use #IF (VS2010) #ENDIF to add Visual Studio version specific code.

Now you're set to implement all the abstract methods of the PolicyBase class.

When you've implemented your policy you need to deploy it to all of your clients. This can either be done using a MSI, a VSIX, the Power Tools or manually. The key thing is to deploy the policy assemblies to the client and then adding a registry key to register your policy. Make sure you register for each version of Visual Studio by substituting the correct Visual Studio Version.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0\TeamFoundation\SourceControl\Checkin Policies]
"JesseHouwing.CheckinPolicies"="C:\Program Files(x86)\\MyCompany\\Checkin Policies\\v12.0\\JesseHouwing.CheckinPolicies.dll"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\12.0\TeamFoundation\SourceControl\Checkin Policies]
"JesseHouwing.CheckinPolicies"="C:\Program Files(x86)\\MyCompany\\Checkin Policies\\v12.0\\JesseHouwing.CheckinPolicies.dll"

One of my new favorite plugins for Visual Studio and TFS


Today I stumbled upon a new Team Explorer extension for TFS in Visual Studio. It almost immediately
made it on my shortlist of things that I need to have on every Visual Studio installation. It's simple, but brilliant.

Ok, enough praise :).

This extension nests itself into Team Explorer and adds a Merge button there. Upon selection of the source and target branch it will automatically list all Change Sets that need merging and when you merge them it automatically associates the correct Change Sets and Work Items. The latter is exactly why I instantly fell in love.

The extension is available for both Visual Studio 2012 and 2013.

Install Team Foundation Server Power Tools side-by-side


If you're like me, then you probably have more than one version of Visual Studio installed on your system. And you might be connecting to multiple versions of TFS as well. Currently I have Visual Studio 2010, 2012 and 2013 installed on my laptop and I connect to TFS 2010, 2012, 2013 and Visual Studio Online on a regular basis.

I've found that the Visual Studio Power Tools add a lot of valuable tricks to Team Explorer and offer some features on the commandline that you'd otherwise need to build your own custom tools for. However, some of the commands must be executed from the TFS server and some of the items that are installed are targeting a specific version of TFS.

As long as you install the Power Tools for "all users" on your machine and have installed the matching Team Explorer version (and patches), you can install them side-by-side, except for one feature, the Windows Explorer Extensions.


Search This Blog


Most Reading