VSTS Team Builds: Getting diagnostic information into the log

To get the MSBuild system to give you all kids of diagnostic information when it runs a Team Build, open up the TFSBuild.rsp file.  This file contains optional command line arguments that get passed to MSBuild.  To crank up the output, add /v:diag as shown below and then check it back into source control.  On your next run, you will see more information than you will know what to do with!

# This is a response file for MSBuild
# Add custom MSBuild command line options in this file

You can see more items that can be placed into the TFSBuild.rsp file by checking out the MSBuild Command Line Reference at MSDN2