April 8, 2013

Using WinMerge and DiffMerge in Visual Studio 2010 and 2012

(Note: See the new post for Visual Studio 2013 and 2015, and WinMerge2011.)

I use WinMerge for file compare and DiffMerge for merge operations in Visual Studio 2010 and 2012. Here are instructions on how to setup Visual Studio to use those tools.

  1. Go to Tools -> Options to bring up the Options dialog
  2. Go to Source Control -> Visual Studio Team Foundation
  3. Click on "Configure User Tools..."

Add a new entry for WinMerge:

  • Extension: .*
  • Operation: Compare
  • Command: C:\Program Files (x86)\WinMerge\WinMergeU.exe
  • Arguments: /e /x /wl /u /dl %6 /dr %7 %1 %2

Add a new entry for DiffMerge:

  • Extension: .*
  • Operation: Merge
  • Command: C:\Program Files\SourceGear\Common\DiffMerge\sgdm.exe
  • Arguments: /m /r=%4 /t1=%7 /t2=%8 /t3=%6 /c=%9 %2 %3 %1

WinMerge hasn't been updated in a while, but still very capable, and much better than the VS built-in tool prior to VS 2012.

DiffMerge offers three-pane comparison, which I can't live without when resolving merge conflicts.

I've been using above tools for many years now. Visual Studio 2012 includes improved built-in compare and merge tool, and that might make above not necessary, but I haven't used it much yet as of now.

It would be nice if these tools were a little bit more smarter, such as detecting code block moves -- like Eclipse Java Compare...

April 7, 2013

Unable to enter BIOS setup

TL;DR: If your computer won't let you enter BIOS setup, try clearing the CMOS.

I had a faulty 2.5 inch hard drive that I wanted to try installing a fresh copy of Windows. I opened up my MSI Wind U100 Netbook and replaced its hard drive with the faulty one. Being a netbook, it didn't have an optical drive, but I had a bootable Windows 7 USB thumb drive, so I plugged that in. Now I needed to go into BIOS to change the boot order. I turned on the netbook and waited for BIOS key prompt to show up during POST, but there was no such prompt, and it proceeded to boot from the faulty drive. I rebooted and tried pressing the DEL key, since I vaguely remembered it being the key to enter the BIOS. No luck. I rebooted several times and tried various other keys that I could think of, but none of them worked. I hunted down the manual for the netbook and confirmed that it was the DEL key...so tried it again, many times, but still no luck.

I was about admit defeat, so I opened up the netbook to take out the faulty drive, but noticed the CMOS battery connection. Just out of curiosity (and since BIOS settings are preserved via CMOS), I unplugged the CMOS battery cable and then plugged it in again. I booted up the netbook, it showed the DEL key information and I was able to enter BIOS setup! Why did this happen? One thing I remembered was that I put the netbook on hibernation when I shutdown before I switched out the drives. So to test my theory I tried hibernating and shutting down normally. If you put it on hibernation, it remembers that and will not let you go into BIOS! BTW, the BIOS is Aptio by American Megatrends.

Where is the BIOS setup key information?
It's back!