Why does Visual Studio 2010 give me error RC1106?

If you have ported a native application built with a previous version of Visual Studio, and you built that application against version 6.x of the Platform SDK, then you will - most likely - encounter this problem.

The fix is as follows:

  • Close VS2010
  • Go to $(USERPROFILE)\appdata\local\microsoft\msbuild\v4.0
  • Edit Microsoft.cpp.Win32.user.props. Keep a copy of the original in case you screw up. It's an XML file, I used Notepad++ to do this. Remove any references to the 6.x Platform SDK.
  • Save the file.
  • Reopen VS2010 and check your Project~Properties. The VC inc/lib directories are in there now, NOT in Tools~Options. Remove any project-specific references to the Platform SDK folders. There shouldn't be any there now, but best to check.
  • Rebuild.

Note that you may read online that simply changing the project's inc/lib directories will solve this problem. It will not. You have to change the XML file. The problem is that VS2010 imports the default inc/lib settings from VS200x, and stuffs them away in this XML file. But the 2010 tools don't support the nologo option that the older SDK used, and barf on it in a terminal fashion. So you have to remove the 6.x references and allow the system to use the 7.0 files included with the VS2010 install.