All-In-One Code Framework

This afternoon, while trying to find a sample that would help me create a Shell Extension for Windows Explorer, I stumbled across the All-In-One Code Framework on CodePlex:

This is not something that I had heard of before, and the initial description of the project warranted some more investigation:


  • Are you frustrated by the lack of code samples for a certain programming task?
  • Have you ever struggled to quickly get started with a technique?
  • Have you expected someone to write code samples for you based on your requests for free?
  • Is a one-stop code sample library for all Microsoft development technologies attractive to you?

If your answer is YES to any of these questions, the Microsoft All-In-One Code Framework is for you!


After watching the introduction video here, I decided to get it installed.

There are two ways that you can use it, either as a standalone application or as a Visual Studio 2010 Extension.  Due to the fact that the sample application is intended for use with the Express Editions of Visual Studio and because I am a hoarder of Visual Studio Extensions, I opted to install the Extension.

With this installed, you have two ways to access the available sample applications.  The first is from the Tools Menu:

All In One Code 1

Clicking on this brings up this:

All In One Code 3

Where you have the option to filter on keyword, language and technology. 

The second method is to highlight a keyword within your code file and filter on that:

All In One Code 2

There are currently 678 sample applications that span a very wide area.  The people behind this strive to create each sample using C#, VB.Net and C++, as well as for Visual Studio 2008 and Visual Studio 2010, so you should always be able to find sample in the language that you require.  If you can’t, there is also the option to request a particular code sample.

Once you have specified the location that you want to store the downloaded sample applications:


You have the option to either download the sample applications as and when you require them, or you can download them all at once.  Also, if an update to an application is published to the CodePlex site, the application notifies you of this, and gives you the option to upgrade.

All in all, I think that this is going to be a useful resource, and I would encourage you to take a look.  Part of becoming a better programmer involves reading other peoples code, and this application gives you access to lots of it.

Visual Studio 2010 crashes when I open build details page

For that last few weeks I have noticed that every time I try to open a build details screen from my Team Foundation Server within Visual Studio 2010 I was greeted with this:


NOTE: By build details screen I mean the TFS build details screen which you can get to via Team Explorer | Builds | View Builds and then double click on an available completed build

The details of the event didn’t really provide much insight into what might be going on:




But due to the fact that I am in the process of transitioning the code base from Visual Studio 2008 to Visual Studio 2010 there really wasn’t much of a push to get this working, as I could simply jump back to my 2008 VM and check what I needed.

The other day though I found myself with a couple minutes, so I thought that I would look into getting the problem fixed.  A quick Bing turned up the following:

The description of the error:

Visual Studio 2010 SP1 crashes or shows the following error when attempting to view a build report on a TFS 2008 server:

"TF50316: The following name is not valid. Verify that the name does not exceed the maximum character limit, only contains valid characters, and is not a reserved name"

Seemed to fit my problem exactly.  I had installed Service Pack 1 for Visual Studio 2010 recently, and I don’t recall the build details screen working since then, and we are still using TFS 2008, so I thought I would give it a try, nothing to lose.

Thankfully, once this fix was installed, the build details page started working again.

A tool to synchronise Visual Studio 2010 Extensions

A while back on Twitter I was having a conversation with Paul Stack (@stack72), in which Paul suggested that there was a fundamental ability missing from the Visual Studio 2010 Extension Manager.  Namely, the ability to synchronise Extensions across multiple Visual Studio 2010 instances.  The upshot of this conversation was a blog post from Paul which you can see here.

Moving forward a month, I got another Tweet from Paul saying that he has solved this problem with the help of Latish Sehgal (@Latish) and his ExtensionSync Visual Studio 2010 Extension.  You can find Paul’s blog post about this here, and more information on Latish’s blog here.

As soon as I heard about this, I immediately set about getting this installed, and tested between Visual Studio 2010 on my work machine, and Visual Studio 2010 on my home machine.  I am happy to say that “it just worked!” 

The only difference in my setup, compared to the example in Latish’s video, I am using Live Mesh to do the sync’ing, rather than DropBox. However, as long as you can get the settings file “shared” between the two machines, there is no reason why you can’t get this working, even if that means emailing the file to your other machine.

With all that set up and running, I thought my work was done.  However, after another conversation with Paul, again via the medium of Twitter (I think I might be addicted to that now), I realised that I had missed a trick!!

This extension, not only provided me with the ability to synchronise my own extensions, but it also provided the ability to synchronise the extensions that are used within a team of developers.  At the minute, I am in the process of upgrading a Visual Studio 2008 solution into Visual Studio 2010, and once that is complete, I will be rolling out a base Visual Studio 2010 Virtual Machine for all the developers to use.  Out of the box, I can make sure that each Virtual Machine has the same extensions, but what if new ones come out that each developer should have?

Sure, I could send out an email to everyone to say, “get this extension installed”, but it would just be plain simpler if that happened automatically.  That way, I can ensure a consistent development environment across all the development machines. 

So, with this in mind, I set up a mapped drive on a common server that each Virtual Machine will be able to hit, and I configured ExtensionSync to use this mapped drive, and again “it just worked!”.

A big thanks to Latish for creating this Extension, and to Paul for the ideas!!

Visual Studio 2010 Compare and Merge Tool Configuration

Out of the box, Visual Studio offers up the ability to compare and merge files.  This ability is invaluable when you are trying to check something in, and there have been changes since you last checked in and you need to merge the changes, or you want to look at the differences in a file between check ins.

However, it has been my experience that the built in tools are just not that great, and there are better tools out there.  My tools of choice are kdiff and winmerge

The good news is that with a few simple steps, these tools can be added into the Visual Studio configuration so that the built in operations of comparing and merging use these tools, rather than the built in ones.

Note: I am assuming that you are using Visual Studio 2010 and Visual Studio Team Foundation Server as your Source Control Provider and Windows 7 64 Bit Edition.  If you are using anything other than this, the screenshots and the paths to executables may be different.

Follow these steps to configure this:

  • Install WinMerge
  • Install KDIff3
  • Open Visual Studio 2010
  • Select Tools | Options and in the tree, select “Source Control”
  • Change the "Current source control plug-in" DropDownList to be "Visual Studio Team Foundation Server"


  • Select "Visual Studio Team Foundation Server" in the tree under "Source Control"
  • Click the "Configure User Tools…" button


  • Click the "Add…" button


  • For the "Extension" put ".*" (without the quotes)
  • For the "Operation" put "Compare"
  • For the "Command" put "C:\Program Files (x86)\WinMerge\WinMergeU.exe" (without the quotes)
  • For the "Arguments" put "/ub /dl %6 /dr %7 %1 %2" (without the quotes)
  • Hit "OK"


  • Click the "Add…" button
  • For the "Extension" put ".*" (without the quotes)
  • For the "Operation" put "Merge"
  • For the "Command" put “C:\Program Files (x86)\KDiff3\kdiff3.exe" (without the quotes)
  • For the "Arguments" put "%3 –fname %8 %2 –fname %7 %1 –fname %6 -o %4" (without the quotes)
  • Hit "OK"


  • Hit "OK"
  • Hit "OK"

Visual Studio 2010 Extensions

Having completed a new install of Visual Studio 2010 I thought I would keep a note of the Extensions that I have added to the default installation, that way I won’t have to try and remember them all if I have to do another install. My memory is bad enough as it is without having to remember anything else!!

Are there any others that I should get?

Note: I will be updating this blog post as and when I add any other extensions.