internal static void ProcessValidationReport(IOutputWindow outputWindow, ValidationReporter validationReporter, bool showWarnings) { // Enumerate all validation messages and write to the output window. foreach (ValidationItem item in validationReporter.ValidationItemsList) { if (item.Severity == Severity.Error) { outputWindow.ReportStatusError(OutputWindowErrorSeverity.Error, GetErrorId(item.ValidationCode), GetValidationReporterMessage(item), item.FilePath, item.Line, item.Offset); } else if (item.Severity == Severity.Warning) { outputWindow.ReportStatusError(OutputWindowErrorSeverity.Warning, GetErrorId(item.ValidationCode), GetValidationReporterMessage(item), item.FilePath, item.Line, item.Offset); } else { outputWindow.ReportStatusMessage(GetValidationReporterMessage(item)); } } if (validationReporter.HasErrors || (showWarnings && validationReporter.HasWarnings)) { // Display the modal form as well var form = new BimlValidationListForm(validationReporter, showWarnings); form.ShowDialog(); } }