Thanks for the comments Eric, I think the issue is to do with the version of MSBuild that is being used to build the project. I have managed to get it working using a Visual Studio project (my devenv is 32 bit, but I'm running on an x64 OS.)
If I use the SHFB project I get the previously mentioned error. The platform property for MSBuild is different than the platform property in a project. The MSBuild platform property can be specified in a TFS build definition.
I'm thinking that because the Microsoft.CompactFramework.CSharp.targets is only installed here C:\Windows\Microsoft.NET\Framework\v3.5, rather than C:\Windows\Microsoft.NET\Framework64\v3.5\Microsoft.CompactFramework.CSharp.targets, I need to do a little
digging to find out what the TFS build definition does, whether it is a paramter that I can pass to MSBuild, or if it is simply launching a different flavour of MS build. (32bit/64bit)
I've ruled out copying files from one folder to another as it's a surefire way of getting my development machine into a mess.
I'll post back my findings.