TfsBuild.rsp and Logging Verbosity in Orcas

In the 2.0 .NET Framework, MSBuild's default verbosity for its FileLogger was "normal".  As such, if you needed diagnostic logging information in a Team Build build (e.g. for debugging an issue with the build process) you needed to add the following to your TfsBuild.rsp file:

/verbosity:diagnostic

-or more briefly-

/v:diag

In the 3.5 .NET Framework, lots of things have changed with respect to the MSBuild file logger.  First of all, the default verbosity for the FileLogger is now "diagnostic" rather than "normal".  Secondly, the FileLogger now has its own command-line options - /fileLogger (/fl) turns on file logging, while /fileLoggerParameters (/flp) is used to pass parameters into the file logger.  So - to set logging versobity back to normal in a Team Build build in Orcas (e.g. when you are not debugging an issue with the build process and want to keep your log files small) you will need to add the following to your TfsBuild.rsp file:

/fileLoggerParameters:verbosity=normal

-or more briefly-

/flp:v=n

Another thing you may notice if you look closely is that Team Build no longer passes too many options to MSBuild directly through the command-line.  Instead, we dynamically generate a new copy of TfsBuild.rsp that contains the standard Team Build options followed by whatever you have in your checked in TfsBuild.rsp (if anything).  As such, a typical TfsBuild.rsp file on a build machine might look something like this:

### Begin Team Build Generated Arguments ###

/m:4
/nologo
/noconsolelogger
/dl:BuildLogger, <BuildLogger Assembly>;<BuildLogger Parameters>
/fl /flp:logfile=BuildLog.txt;encoding=Unicode;
/p:BuildDefinition="BuildDefinition"
/p:DropLocation="\\MACHINENAME\DropLocation"
/p:BuildProjectFolderPath="$/TeamProject/TeamBuildTypes/BuildDefinition"
/p:BuildUri="vstfs:///Build/Build/1"
/p:TeamFoundationServerUrl="https://tfs:8080"
/p:TeamProject="TeamProject"
/p:SourcesSubdirectory="Sources"
/p:BinariesSubdirectory="Binaries"
/p:TestResultsSubdirectory="TestResults"
/p:SourceGetVersion="C3"
/p:LastGoodBuildLabel=""
/p:LastBuildNumber=""
/p:LastGoodBuildNumber=""
/p:NoCICheckInComment="***NO_CI***"
/p:IsDesktopBuild="false"
/p:TeamBuildRefPath="C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies"
/t:EndToEndIteration

TFSBuild.proj

### End Team Build Generated Arguments ###

### Begin Checked In TfsBuild.rsp Arguments ###

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

/flp:verbosity=normal

### End Checked In TfsBuild.rsp Arguments ###

Again, if you look carefully here you may notice the /m:4 option at the top of the sample rsp file.  This has to do with MSBuild 3.5's new multi-process feature - more on this in a subsequent post!