diff --git a/BuildFiles/Building/XBuildLog2Xml.exe b/BuildFiles/Building/XBuildLog2Xml.exe index 39ab2ae5..a43098c6 100644 Binary files a/BuildFiles/Building/XBuildLog2Xml.exe and b/BuildFiles/Building/XBuildLog2Xml.exe differ diff --git a/BuildFiles/Building/XBuildLog2Xml/Program.cs b/BuildFiles/Building/XBuildLog2Xml/Program.cs index 6ca09fcc..5626a063 100644 --- a/BuildFiles/Building/XBuildLog2Xml/Program.cs +++ b/BuildFiles/Building/XBuildLog2Xml/Program.cs @@ -129,20 +129,25 @@ namespace XBuildLog2Xml { if (result.WarningsTotal + result.ErrorsTotal > 0) { - xmlWriter.WriteStartElement ("project"); - xmlWriter.WriteAttributeString ("name", result.ProjectName); - - if (result.ErrorsTotal > 0) + if (result.ErrorsTotal > 0 && sumErrors > 0) // write only errors if there are any errors { + xmlWriter.WriteStartElement ("project"); + xmlWriter.WriteAttributeString ("name", result.ProjectName); + WriteXmlBuildMessages (xmlWriter, result.Errors); - } - else - { - WriteXmlBuildMessages (xmlWriter, result.CodeWarnings); - WriteXmlBuildMessages (xmlWriter, result.EnvironmentWarnings); - } - xmlWriter.WriteEndElement(); + xmlWriter.WriteEndElement(); + } + else if (result.WarningsTotal > 0 && sumErrors == 0) // if there are no errors in ANY project, write the warnings for all projects + { + xmlWriter.WriteStartElement("project"); + xmlWriter.WriteAttributeString("name", result.ProjectName); + + WriteXmlBuildMessages(xmlWriter, result.CodeWarnings); + WriteXmlBuildMessages(xmlWriter, result.EnvironmentWarnings); + + xmlWriter.WriteEndElement(); + } } }