tags:

views:

23

answers:

2

I read the description from MSDN about MSBuild at http://msdn.microsoft.com/en-us/library/ms164311(v=VS.80).aspx) (the /logger parameter) but it is absolutely not clear enough. I need a list of available arguments for file logger. Please help!

A: 

The /logger parameter is useful if you want to specify a custom logger. In your case you just have to use the include file logger.

msbuild /fileLogger

This command logs the build output to a single file ("msbuild.log") in the current directory.

If you want to specify the directory use this command :

msbuild /fileLogger /fileLoggerParameters:LogFile=MyLog.log;Append;Verbosity=diagnostic;Encoding=UTF-8
madgnome
+1  A: 

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.
  • DiableMPLogging : 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.

Sayed Ibrahim Hashimi