You can write your own journal as described here: http://msdn.microsoft.com/en-us/library/ms171471.aspx
Here is some code to get you started:
public class SummaryLogger : Logger { int warningCount = 0; int errorCount = 0; public override void Initialize(IEventSource eventSource) { eventSource.WarningRaised += eventSource_WarningRaised; eventSource.ErrorRaised += eventSource_ErrorRaised; eventSource.BuildFinished += eventSource_BuildFinished; } void eventSource_WarningRaised(object sender, BuildWarningEventArgs e) { warningCount++; Console.WriteLine("Warning: " + e.Message); } void eventSource_ErrorRaised(object sender, BuildErrorEventArgs e) { errorCount++; Console.WriteLine("Error: " + e.Message); } void eventSource_BuildFinished(object sender, BuildFinishedEventArgs e) { Console.WriteLine("MSBuild Finished: " + errorCount + " errors | " + warningCount + " warnings."); } }
This log logs warnings, errors and summarizes the number of errors and warnings. You need to add some code for time and projects, so this is exactly what you want.
To use it, you call MSBuild with the following parameters added:
/nologo /noconsolelogger /logger:pathTo/SummaryLogger.dll
Didier A.
source share