Thanks to Sathya Narayanan Srinivasan for his blog post on solving this issue.
The solution is:
1. Close Visual Studio
2. Open Visual Studio Command Prompt. (Start Menu --> Microsoft Visual Studio 2010 --> Visual Studio Tools. Right-click on the Visual Studio Command Prompt shortcut, select Run as Administrator.)
3. run the command "devenv /installvstemplates"