Microsoft provides full Git support for Visual Studio 2012 and Team Foundation Service


Today Microsoft publicly introduced the first Community Preview version of the Git tools for Visual Studio and the Team Foundation Service at the ALM Summit. Microsoft is fully committed to supporting this open distributed version control platform going forward. This was one of the top requests on Uservoice. It's pretty cool to see how both Microsoft and groups like the ALM Rangers are actively looking at these suggestions and transform them in working features.

A few features are not yet on par with 'standard' Team Foundation Server version control, any current feature that depends on Changesets will not work with Git as version control provider. I expect Microsoft will work on enabling these features going forwards. Most visible feature to not be supported in Git for now would be Visual Studio Code Review.

Focusing on the things Git does enable is much more interesting.
  • Compared to local workspaces, Git is a lot more powerful. 
  • The Branching and Merging capabilities, especially of 'baseless' merges are a lot more powerful than in standard Version Control. 
  • It works with any Git repository out there
  • The Team Foundation Service implementation is straight Git and thus you can use Visual Studio with any Git Repository, but  you can also use any development environment that supports Git and connect to the Team Foundation Service.
Git is not yet released as an addon or feature for the on-premise version of Team Foundation Server. Expect it in the next major release.

Congratulations to the team that made this happen. Keep up the good work!

If you, like me, would like to get to know Git a bit better, check out these free (and very extensive) ebooks!


Convert a TFS 2010 Group to a 2012 Team after upgrade


With TFS 2010 it was already a common practice to create security groups as subgroups of the Contributors group to define teams. When you upgrade a Team Project Collection with such a setup to 2012, there is no way to convert these existing semi-teams to fully supported 2012 teams out of the box.

It turns out that you only need to apply a few small changes to the security group to have it upgraded.

Connect to TFS and retrieve the group:

collection = TfsTeamProjectCollectionFactory.GetTeamProjectCollection(new Uri(collectionUri));

var identityManagementService = collection.GetService<IIdentityManagementService2>();

var securityIdentity = identityManagementService.ReadIdentity(group);

Set the team property and save it:

securityIdentity.SetProperty(IdentityPropertyScope.Local, "Microsoft.TeamFoundation.Team", (object) true);

I'll probably end up submitting this as another patch to the TFS Team Tools project.

Which UIEditors are available for Team Build by default


Types inheriting from UITypeEditor
Recently I was asked to extend a Build Template for Team Build. There were a few fancy things which were required for this template, including picking files and folders in Source Control, selecting Work Items etc. I looked around the documentation on, but the information on the available editors is scarce and incomplete (or I didn't look good enough).

I decided to fire up NDepend to find the types I was interested in and from there I used good old .NET Reflector to look for the return type of each of them. Using this I found a few gems. All nicely marked Internal and thus hidden from view. I'm guessing this means these Editors come without support and may change without warning, but if that doesn't deter you, then read on for the complete list

Which Check-in policies do you use with your projects?


Team Foundation Server allows an administrator to define a Check-in policy to ensure all code that is checked in conforms to a certain standard and that a minimal set of quality attributes have been applied to that code. Not all of these policies make sense in every situation and implementing them can be negatively perceived by the development team. It's often better to explain (over and over again, in person) the benefit of doing things right, them let a tool tel people what to do.

Please comment on any great policies I might have missed or ways to be able to remove these policies in place completely!

Red-Gate releases Reflector 8.0

Red-Gate just released Reflector 8.0. Not with a lot of fanfare, as I only noticed because my Early Access Program Build wouldn't start and because there was no new EAP build available to download. They improved searching and filtering inside Reflector by introducing a filter bar in the tree view on the left.

The original Search functionality is still available, but this one is a lot easier to use.

They've also improved the debugging of 3rd party assemblies inside Visual Studio, it's a feature I rarely need, but when I need it, it's worth every penny (cent).

If you have a license for version 7.0, you get this upgrade for free, even though the upgrade wizard will tell you it will download the 14-day trial version. That version will automatically activate with your version 7 license.

FxCopContrib Alpha for Visual Studio 2012


I've just ported, fixed, compiled and released a version of my FxCopContrib library that should work under Visual Studio 2012 and Team Build 2012.

The following rules are included:
    And I've also included a 2012 port of the Microsoft Sharepoint Online Code Analysis Framework rules.

    To enable these rules, extract the .7z file to your Visual Studio 11.0\Team Tools\Static Analysis\FxCop\Rules directory. You can then create a new Code Analysis Ruleset for your Visual Studio solution to enable these rules.

    For those interested in writing their own rules, I've built a small Test Harness for Code Analysis rules based on the latest CTP of Roslyn. This makes it a lot easier to verify the rules actually work as expected. I'll write a separate blog on that later.

    Make you custom TFS tools clever by automatically figuring out the Project Collection


    As you might have noticed, most TFS Command Line tools will automatically figure out the TFS server to connect to by somehow figuring out the TFS Server from the current folder you have open. When you're anywhere in a mapped workspace, most tools will automatically connect to that TFS Server, Project Collection and Project.

    Here's how to do that yourself:

    using Microsoft.TeamFoundation.Client;
    using Microsoft.TeamFoundation.VersionControl.Client;
    var workspace = Workstation.Current.GetLocalWorkspaceInfo(Directory.GetCurrentDirectory());
    if (workspace != null)
      teamProjectUri = workspace.ServerUri;
      var server = TfsConfigurationServerFactory.GetConfigurationServer(teamProjectUri);
      var projectCollection = TfsTeamProjectCollectionFactory.GetTeamProjectCollection(teamProjectUri)
      var cssService = projectCollection.GetService<ICommonStructureService4>();
      var project = cssService.GetProjectByName(ProjectName)

    This way you'll be able to create command line tools that require fewer information to function. Which just makes them easier to use :).

    Set your TFS profile or team image from the commandline

    One of the cool new features of Team Web Access is that you can now set a Team and Personal mugshot. This is one more step towards making the software development experience more personal and people oriented.

    This new feature in 2012 requires each user to set their own image once per TFS instance they use and the image is automatically shares across all projects and project collections. There is, however, no simple way to bulk set the profile images for all users from the command line or through PowerShell.

    Well there wasn't, until today :).

    Team Foundation Server 2012 Update 1 Hotfix released

    If you've already upgraded your Team Foundation Server 2012 to Update 1, you might have encountered issues after attaching a project collection to your server. This is caused by a bug in Update 1 that removed all permissions from your Project Collection.

    Microsoft has just released a Hotfix for this issue. Read more about it on Brian Harry's blog.

    Most Reading