Replace diff/merge tool in Visual Studio Team System with WinMerge
January 31, 2010
I have been using Visual Studio Team System 2008 for a while now and am really starting to like the tightly integrated source control and work item functionality. One thing I cannot get used to is the basic diff/merge tool.
Where is the detail ?
The screenshot below demonstrates the basic nature of the diff tool built into Visual Studio Team System. There is no indication of the number of differences between the files being diff’ed or even the actual differences on a particular line …
WinMerge
There is an alternative and it is both open source and free ! From the WinMerge site:
WinMerge is an Open Source differencing and merging tool for Windows. WinMerge can compare both folders and files, presenting differences in a visual text format that is easy to understand and handle.
Download WinMerge and install it.
Configure Visual Studio
Open Source Control > Visual Studio Team Foundation under the Tools > Options menu in Visual Studio.

Click on Configure User Tools … and the Configure User Tools dialog will become available.

Add the WinMerge details for the Compare Tool. Click on the Add … button on the Configure User Tools dialog and configure as per the screenshot below. The arrow button next to the arguments text box exposes details about the information that Visual Studio can provide the tool being configured.

Add the WinMerge details for the Merge Tool. Click on the Add … button on the Configure User Tools dialog and configure as per the screenshot below. The arrow button next to the arguments text box exposes details about the information that Visual Studio can provide the tool being configured.

The Compare and Merge Operations should now be configured to use WinMerge.
WinMerge Command Line Options
WinMerge contains a number of command line options. The following are the ones used in the configuration above.
| /e | Enables WinMerge to be closed with a single Esc key press. |
| /u | Prevents WinMerge from adding either the left or right hand side file path to the Most Recently Used (MRU) list. |
| /wl | Opens left hand side as read-only. |
| /wr | Opens right hand side as read-only. |
| /dl | Description for left hand side title bar. |
| /dr | Description for right hand side title bar. |
Finally a decent diff !
Now a Compare in Visual Studio is more meaningful, It shows the number of differences, their positions within the compared files and actual differences per line. WinMerge supports custom syntax colouring and diff colouring.
I have been using Visual Studio Team System 2008 for a while now and am really starting to like the tightly integrated source control and work item functionality. One thing I cannot get used to is the basic diff/merge tool.
Quick Guide
This quick guide offers a no frills/get things done approach to replacing the diff/merge tool in Visual Studio Team System with WinMerge. There is a detailed guide for those that want to have a little more detail.
Quick Steps
- Download and install WinMerge.
- Open the Configure User Tools dialog for Team Foundation based source control in Visual Studio.
Tools > Options > Source Control > Visual Studio Team Foundation > Configure User Tools - Add the details for the Compare (diff) Tool by clicking on the Add… button.
Extension: .*Operation: CompareCommand: C:\Program Files\WinMerge\WinMergeU.exeArguments: /e /u /wl /wr /dl %6 /dr %7 %1 %2 - Add the details for the Merge Tool by clicking on the Add… button.
Extension: .*Operation: MergeCommand: C:\Program Files\WinMerge\WinMergeU.exeArguments: /e /u /wl /dl %6 /dr %7 %1 %2 %4
Quick Guide: Migrate a virtual machine from Virtual PC to Hyper-V
November 16, 2009
The Microsoft VHD (Virtual Hard Disk) image format is used by the following Microsoft virtualisation technologies: Virtual PC 2007, Virtual Server 2005 R2 and Hyper-V. There are however some subtleties when getting a VHD image from one of these technologies to work on another.
Quick Guide
This quick guide offers a no frills/get things done approach to migrating a virtual machine from Virtual PC to Hyper-V. There is also a detailed guide coming for those that want to know the why and not only the how.
Quick Steps
- Hyper-V Manager – Create a new Virtual Machine. Use an existing virtual hard disk and specify the location of the vhd file you want to use.
New > Virtual Machine - Virtual Machine – Uninstall the Virtual Machine Additions which are extensions specific to Virtual PC.
Control Panel > Programs and Features > Virtual Machine Additions > Uninstall - Reboot.
- Virtual Machine – Install Integration Services from the Action menu in the Virtual Machine Connection console.
Insert Integration Services Setup Disk > Install (from AutoPlay) - Reboot – updates will install.
- Virtual Machine – Without this step the mouse will not work within the virtual machine. Restart will result in the mouse working.
Run > MSConfig > Boot tab > Advanced Options > Detect HAL - Reboot – new hardware will be detected and mouse will work.