Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the available arguments for file logger when running MSBuild.exe?

Tags:

msbuild

I've read MSBuild Command-Line Reference at MSDN (the /logger parameter), but it is absolutely not clear enough. I need a list of available arguments for file logger.

like image 724
Nam G VU Avatar asked Apr 22 '10 13:04

Nam G VU


People also ask

What is MSBuild binlog?

By default the file is in the current directory and named "msbuild.binlog". The binary log is a detailed description of the build process that can later be used to reconstruct text logs and used by other analysis tools.

What is switch in MSBuild?

When you use MSBuild.exe to build a project or solution file, you can include several switches to specify various aspects of the process. Every switch is available in two forms: -switch and /switch. The documentation only shows the -switch form. Switches are not case-sensitive.


1 Answers

Here are the parameters for MSBuild 3.5

  • Append : If an existing log file exists, it will be appended to instead of overwritten. You do not need to specify a value for this parameter; its existence will set it. In fact, if you specify a value, even false, it will be ignored! Default value is false.
  • Encoding : Used to specify the encoding that will be used to write the log file. This is interpreted by the System.Text.Encoding.GetEncoding(string) method. Default value is the default encoding for the system.
  • Logfile : Specifies the path to where the log file will be written. Default value is msbuild.log.
  • Verbosity : Used to specify the value for the verbosity of the logger. This uses the same values as mentioned previously. Default value is Normal for 2.0 and Detailed for 3.5.
  • PerformanceSummary : When passed as a parameter, the console logger will output messages that show the amount of time spent building tasks, targets, and projects. If you are trying to profile long running builds this may be very useful.
  • NoSummary : When passed, this suppresses the errors and warnings summary that is typically displayed at the end of the log.
  • NoItemAndPropertyList : Indicates to not display the values for properties and items that are typically shown at the start of the build log when using the diagnostic verbosity setting.
  • Summary : Shows errors and warnings summary at the end of the log.
  • ErrorsOnly : Shows only errors.
  • WarningsOnly : Shows only warnings.
  • ShowTimestamp : Displays a timestamp to every message.
  • ShowEventId : Displays the event ID for started, finished, and message events.
  • DisableMPLogging : Disables the multiprocessor logging style of output when running in non-multiprocessor mode.
  • EnableMPLogging : Enables the multiprocessor logging style even when running in non-multiprocessor mode. This logging style is on by default.

I took this from my book Inside the Microsoft Build Engine : Using MSBuild and Team Foundation Build.

like image 67
Sayed Ibrahim Hashimi Avatar answered Dec 05 '22 00:12

Sayed Ibrahim Hashimi