Share via


Passing options to msbuild command line in TeamBuild process

TeamBuild Type Creation Wizard creates a file called ‘Tfsbuild.rsp’ with every build type. Using this, user can pass additional options to msbuild command line that gets executed on the build machine. It is quite useful, when user wants to override properties globally or pass additional custom loggers.

 

You would add the following 3 lines to TfsBuild.proj to define MyProperty, exclude couple of code analysis rules and pass MyLogger as a custom logger.

 

/p:MyProperty=MyValue

/p:CodeAnalysisRules=-Microsoft.Design#CA1012;-Microsoft.Design#CA2210;

/logger:XMLLogger,C:\Loggers\MyLogger.dll