I cloned DataAnnotationExtension from github and tried to run build.cmd that comes with it. What do I get… a lot of red: Build FAILED. Never good.

MSBuild - build failure - target platform HPD

The specified solution configuration "release|HPD" is invalid.

It turns out that MSBuild.exe looks for an environment variable if you don’t explicitly define a platform in the arguments. And indeed, my System Environment Variables contain a ‘Platform’ variable with the value ‘HPD’. What’s HPD you might ask? My machine is a HP Pavilion Elite, a **d**esktop machine. So I guess that makes the HPD acronym. The solution however is very simple, you either remove the environment variable or you define the platform when calling msbuild.exe like this:

%WINDIR%Microsoft.NETFrameworkv4.0.30319msbuild.exe BuildBuild.proj /p:Configuration="%config%" /p:Platform="Any CPU"

Source: [MSBuild and its use of the “Platform” environment variable](http://social.msdn.microsoft.com/Forums/en-US/msbuild/thread/3c4e9c3f-2bf2-436e-80de-e000a7dda8bd/ "MSBuild and its use of the "Platform" environment variable")

system environment variable hpd