Build fails from some strange reason or build does not perform the things you expect it to do, what to do? Every team build in the TeamBuildTypes folder contains a TFSBuild.rsp file, perform a check out and add the following command argument to it:
/v:diag
Check the file in and run the build; beware that the log size increases dramatically. The build log contains very detailed information, even the contents of all variables used in the build.