WinCE SDK problems in Windows 7

For the last few weeks, my work project has not been building it’s WinCE target on my new Windows 7 PC. Each project would just say “skipping build”,

12>------ Skipped Build: Project: PROJECT_NAME_12 ------
12>
13>------ Skipped Build: Project: PROJECT_NAME_13 ------
13>
========== Build: 0 succeeded or up-to-date, 0 failed, 13 skipped ==========

and if I tried to edit the project properties (or build/clean/rebuild project only), I would get

“The operation could not be completed”

Visual Studio Project Properties Error
Visual Studio Project Properties Error

It then dawned on my to try a new project test, and the SDK was missing from the options:

Missing SDK
Missing SDK

A bit of focused searching found Windows CE: SDK Doesn’t Show up in Visual Studio 2008 post, and the solution worked for me with my Visual Studio 2005 SDK under Windows 7 also:

  1. Make sure Visual Studio 2005 is not running. I also shut down the device emulator manager but you may not be using that
  2. Open a “Visual Studio 2005 Command Prompt” as Administrator. On Windows 7 just right click the short cut and pick the “Run as Administrator” option
  3. Enter the following command: msiexec /package <the path to your .msi file>
  4. Install

You need to used the same steps above to uninstall the SDK as well (as compared to the Control Panel’s ‘Programs and Features’ options), otherwise it won’t uninstall correctly.