In order to test the modules, I wrap the log around a helper class
public static void Log(ITask task, string message, MessageImportance importance)
{
try
{
BuildMessageEventArgs args = new BuildMessageEventArgs(message, string.Empty,
task.ToString(), importance);
task.BuildEngine.LogMessageEvent(args);
}
catch (NullReferenceException)
{
}
}
Currently, I would probably convert this to an extension method for convenience.
si618 source
share