1. Home
  2. Windows Tips
  3. Compare visual studio 2010 code modules with clipboarddiff

Compare Visual Studio 2010 Code Modules With ClipboardDiff

It happens quite often that we come across two apparently same modules in code file opened in Visual Studio. Since comparing code structure in Visual Studio is relatively difficult than other lightweight software IDEs, one has to find other ways than to open two Visual Studio windows to find differences between code structures/modules in question. Many users simply copy the code modules to plain text file and then compare them side-by-side to find differences. If you hate going through long winded processes to compare two code structures from Visual Studio, ClipboardDiff provides a simple yet quick solution. It’s a small add-in that lets users compare code modules, moved to Windows clipboard, through any external file comparison tool.

ClipboardDiff adds itself an option in Visual Studio 2010 right-click context menu, so you can quickly change code comparison arguments and view differences in associated file comparison tool. Before you  begin installing the add-in, make sure that Visual Studio 2010 is not running in background. Now install the plugin and select ClipboardDiff Settings from Tools menu.

clipboarddiff1

A new dialog will pop-up asking you to specify executable file of any external file comparison utility of your choice. If you haven’t installed one, you can pick one from following tools; DiffMerge, WinMerge, and kDiff3. For instance, if you choose DiffMerge, enter the source path of DiffMerge application executable file and click OK.

compare 2

When you want to compare two code modules in order to find text related differences, copy the portion of code which you want to compare to Windows clipboard. Now, head over to second code module present in Visual Studio document, select the portion which is to be compared, from right-click context menu, click Diff selection against clipboard. You can alternatively use Shift+Alt+J hotkey combination after selecting the code.

diffselection 1

This will immediately open two code structures/modules in specified file comparison tool. This enables you to quickly analyze differences between them.

diffmerrge

If your specified tool supports merge function, you can change file comparison arguments from ClipboardDiff settings window. ClipboardDiff only works on Visual Studio 2010.

Download ClipboardDiff

Comments are closed.