Getting the WP7 SDK onto a Windows Server 2008 TFS Build Agent

If you try to create an automated TFS build of a Windows Phone 7 Silverlight application on a ‘default installed’ build agent you will see errors along the lines of

The imported project "C:\Program Files\MSBuild\Microsoft\Silverlight for Phone\v4.0\Microsoft.Silverlight.WindowsPhone.Overrides.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

This is because the PC your build agent is running on does not have the WP7 SDK installed.

Simple you would think, lets just install the SDK. Well, if your build box is based on any Windows Server operating system you quickly hit a problem that you get the error the “Windows 7 or Windows Vista is required”

image

There is no supported route around this, but there is a hack. The fix is to follow the UNSUPPORTED process on Aaron Stebner's blog. This edits the baseline.dat from the installation media to make, in my case, Windows Server 2008 a supported operating system. Once this was done the SDK could be installed and automated builds run.

As usually, as this is unsupported, it is buyer beware, try it at your own risk.