public override string FormatErrorEvent(BuildErrorEventArgs args)
 {
     return (string.Format(Resources.ERROR_MESSAGE.Replace(@"\t", "\t"),
                           trimPath(args.ProjectFile),
                           trimPath(args.File),
                           args.LineNumber, args.ColumnNumber, args.Message));
 }
		void EventSourceErrorRaised (object sender, BuildErrorEventArgs e)
		{
			string file = e.File;
			if (file != null)
				file = Path.GetFullPath (Path.Combine (basePath, file));
			results.Add (new MSBuildResult (false, file, e.LineNumber, e.ColumnNumber, e.Code, e.Message));
		}
 public void ErrorRaised(object sender, BuildErrorEventArgs e)
 {
     // BuildErrorEventArgs adds LineNumber, ColumnNumber, File, amongst other parameters
     string line = string.Format("{3}: Error {0}({1},{2}): ", e.File, e.LineNumber, e.ColumnNumber, e.Message);
     this.handler(this, new ValEventArgs(line, this.indent));
     this.errors++;
 }
        public void LogBuildEvents()
        {
            // This event should only be logged when OnlyLogCriticalEvents is off
            BuildMessageEventArgs messageEvent = new BuildMessageEventArgs("MyMessage", "HelpKeyword", "Sender", MessageImportance.High);

            // These three should be logged when OnlyLogCritical Events is on or off
            BuildWarningEventArgs warning = new BuildWarningEventArgs("SubCategoryForSchemaValidationErrors", "MSB4000", "file", 1, 2, 3, 4, "message", "help", "sender");
            BuildErrorEventArgs error = new BuildErrorEventArgs("SubCategoryForSchemaValidationErrors", "MSB4000", "file", 1, 2, 3, 4, "message", "help", "sender");
            ExternalProjectStartedEventArgs externalStartedEvent = new ExternalProjectStartedEventArgs("message", "help", "senderName", "projectFile", "targetNames");

            ProcessBuildEventHelper loggingService = (ProcessBuildEventHelper)ProcessBuildEventHelper.CreateLoggingService(LoggerMode.Synchronous, 1);

            // Verify when OnlyLogCriticalEvents is false
            LogandVerifyBuildEvent(messageEvent, loggingService);
            LogandVerifyBuildEvent(warning, loggingService);
            LogandVerifyBuildEvent(error, loggingService);
            LogandVerifyBuildEvent(externalStartedEvent, loggingService);

            // Verify when OnlyLogCriticalEvents is true
            loggingService.OnlyLogCriticalEvents = true;
            loggingService.LogBuildEvent(messageEvent);
            Assert.IsNull(loggingService.ProcessedBuildEvent, "Expected ProcessedBuildEvent to be null");
            LogandVerifyBuildEvent(warning, loggingService);
            LogandVerifyBuildEvent(error, loggingService);
            LogandVerifyBuildEvent(externalStartedEvent, loggingService);
        }
Example #5
0
 /// <summary>
 /// Handles error notification events by storing the error message String.
 /// </summary>
 void ErrorRaised(object sender, BuildErrorEventArgs e)
 {
     _errors.Add(e.Message);
     #if DEBUG
     Debug.WriteLine("CONTENT: " + e.Message);
     #endif
 }
Example #6
0
        public void VerifyEventType()
        {
            BuildFinishedEventArgs buildFinished = new BuildFinishedEventArgs("Message", "Keyword", true);
            BuildStartedEventArgs buildStarted = new BuildStartedEventArgs("Message", "Help");
            BuildMessageEventArgs lowMessage = new BuildMessageEventArgs("Message", "help", "sender", MessageImportance.Low);
            TaskStartedEventArgs taskStarted = new TaskStartedEventArgs("message", "help", "projectFile", "taskFile", "taskName");
            TaskFinishedEventArgs taskFinished = new TaskFinishedEventArgs("message", "help", "projectFile", "taskFile", "taskName", true);
            TaskCommandLineEventArgs commandLine = new TaskCommandLineEventArgs("commandLine", "taskName", MessageImportance.Low);
            BuildWarningEventArgs warning = new BuildWarningEventArgs("SubCategoryForSchemaValidationErrors", "MSB4000", "file", 1, 2, 3, 4, "message", "help", "sender");
            BuildErrorEventArgs error = new BuildErrorEventArgs("SubCategoryForSchemaValidationErrors", "MSB4000", "file", 1, 2, 3, 4, "message", "help", "sender");
            TargetStartedEventArgs targetStarted = new TargetStartedEventArgs("message", "help", "targetName", "ProjectFile", "targetFile");
            TargetFinishedEventArgs targetFinished = new TargetFinishedEventArgs("message", "help", "targetName", "ProjectFile", "targetFile", true);
            ProjectStartedEventArgs projectStarted = new ProjectStartedEventArgs(-1, "message", "help", "ProjectFile", "targetNames", null, null, null);
            ProjectFinishedEventArgs projectFinished = new ProjectFinishedEventArgs("message", "help", "ProjectFile", true);
            ExternalProjectStartedEventArgs externalStartedEvent = new ExternalProjectStartedEventArgs("message", "help", "senderName", "projectFile", "targetNames");

            VerifyLoggingPacket(buildFinished, LoggingEventType.BuildFinishedEvent);
            VerifyLoggingPacket(buildStarted, LoggingEventType.BuildStartedEvent);
            VerifyLoggingPacket(lowMessage, LoggingEventType.BuildMessageEvent);
            VerifyLoggingPacket(taskStarted, LoggingEventType.TaskStartedEvent);
            VerifyLoggingPacket(taskFinished, LoggingEventType.TaskFinishedEvent);
            VerifyLoggingPacket(commandLine, LoggingEventType.TaskCommandLineEvent);
            VerifyLoggingPacket(warning, LoggingEventType.BuildWarningEvent);
            VerifyLoggingPacket(error, LoggingEventType.BuildErrorEvent);
            VerifyLoggingPacket(targetStarted, LoggingEventType.TargetStartedEvent);
            VerifyLoggingPacket(targetFinished, LoggingEventType.TargetFinishedEvent);
            VerifyLoggingPacket(projectStarted, LoggingEventType.ProjectStartedEvent);
            VerifyLoggingPacket(projectFinished, LoggingEventType.ProjectFinishedEvent);
            VerifyLoggingPacket(externalStartedEvent, LoggingEventType.CustomEvent);
        }
		public void AssignmentTest ()
		{
			BuildErrorEventArgs beea;
			string subcategory = "subcategory";
			string code = "CS0000";
			string file = "file";
			int lineNumber = 1;
			int columnNumber = 2;
			int endLineNumber = 3;
			int endColumnNumber = 4;
			string message = "message";
			string helpKeyword = "helpKeyword";
			string senderName = "MSBuild";
			
			beea = new BuildErrorEventArgs (subcategory, code, file, lineNumber, columnNumber, endLineNumber,
				endColumnNumber, message, helpKeyword, senderName);
			
			Assert.AreEqual (subcategory, beea.Subcategory, "Subcategory");
			Assert.AreEqual (code, beea.Code, "Code");
			Assert.AreEqual (file, beea.File, "File");
			Assert.AreEqual (lineNumber, beea.LineNumber, "LineNumber");
			Assert.AreEqual (columnNumber, beea.ColumnNumber, "ColumnNumber");
			Assert.AreEqual (endLineNumber, beea.EndLineNumber, "EndLineNumber");
			Assert.AreEqual (endColumnNumber, beea.EndColumnNumber, "EndColumnNumber");
			Assert.AreEqual (message, beea.Message, "Message");
			Assert.AreEqual (helpKeyword, beea.HelpKeyword, "HelpKeyword");
			Assert.AreEqual (senderName, beea.SenderName, "SenderName");
		}
Example #8
0
        void eventSource_ErrorRaised(object sender, BuildErrorEventArgs e)
        {
            //TODO: task list?
            var s = String.Format("{0}({1},{2}): error {3}: {4}\n",
                e.File, e.LineNumber, e.ColumnNumber, e.Code, e.Message);

            Log(s);
        }
Example #9
0
 void ErrorRaised(object sender, BuildErrorEventArgs e)
 {
     string fullPath = ProjectDirectory != null ? Path.Combine(ProjectDirectory, e.File) : e.File;
     Console.ForegroundColor = ConsoleColor.DarkRed;
     Console.WriteLine("{0}({1},{2})  error:{3}  {4}", fullPath, e.LineNumber, e.ColumnNumber, e.Code, e.Message);
     ErrorCount++;
     Console.ForegroundColor = ConsoleColor.White;
 }
Example #10
0
 void ErrorRaised(object sender, Microsoft.Build.Framework.BuildErrorEventArgs e)
 {
     if (logger is LoggerResult loggerResult)
     {
         loggerResult.Module = string.Format("{0}({1},{2})", e.File, e.LineNumber, e.ColumnNumber);
     }
     logger.Error(e.Message);
 }
Example #11
0
        public void LogErrorEvent(BuildErrorEventArgs eventArgs)
        {
            Console.WriteLine(EventArgsFormatting.FormatEventMessage(eventArgs));
            _log += EventArgsFormatting.FormatEventMessage(eventArgs);
            ++_errors;

            _log += "\n";
            _upperLog = null;
        }
Example #12
0
        /// <summary>
        /// Format the error event message and all the other event data into
        /// a single string.
        /// </summary>
        /// <param name="e">Error to format</param>
        /// <returns>The formatted message string.</returns>
        internal static string FormatEventMessage(BuildErrorEventArgs e, bool removeCarriageReturn, bool showProjectFile)
        {
            ErrorUtilities.VerifyThrowArgumentNull(e, "e");

            // "error" should not be localized
            return FormatEventMessage("error", e.Subcategory, removeCarriageReturn ? EscapeCarriageReturn(e.Message) : e.Message,
                e.Code, e.File, showProjectFile ? e.ProjectFile : null, e.LineNumber, e.EndLineNumber,
                            e.ColumnNumber, e.EndColumnNumber, e.ThreadId);
        }
Example #13
0
		void EventSourceErrorRaised (object sender, BuildErrorEventArgs e)
		{
			//NOTE: as of Mono 3.2.7, e.ProjectFile does not exist, so we use our projectFile variable instead
			results.Add (new MSBuildTargetResult (
				projectFile, false, e.Subcategory, e.Code, e.File,
				e.LineNumber, e.ColumnNumber, e.ColumnNumber, e.EndLineNumber,
				e.Message, e.HelpKeyword)
			);;
		}
        void eventSource_ErrorRaised(object sender, BuildErrorEventArgs e)
        {
            // BUILDERROREVENTARGS ADDS LINENUMBER, COLUMNNUMBER, FILE, AMONGST OTHER PARAMETERS
            string line = String.Format(": ERROR {0}({1},{2}): ", e.File, e.LineNumber, e.ColumnNumber);

            using (StreamWriter sw = new StreamWriter("logfil.txt"))
            {
                sw.WriteLine(line);
            }
        }
 public void EventArgsCtors()
 {
     BuildErrorEventArgs beea = new BuildErrorEventArgs2();
     beea = new BuildErrorEventArgs("Subcategory", "Code", "File", 1, 2, 3, 4, "Message", "HelpKeyword", "sender");
     beea = new BuildErrorEventArgs("Subcategory", "Code", "File", 1, 2, 3, 4, "Message", "HelpKeyword", "sender", DateTime.Now);
     beea = new BuildErrorEventArgs("Subcategory", "Code", "File", 1, 2, 3, 4, "{0}", "HelpKeyword", "sender", DateTime.Now, "Messsage");
     beea = new BuildErrorEventArgs(null, null, null, 1, 2, 3, 4, null, null, null);
     beea = new BuildErrorEventArgs(null, null, null, 1, 2, 3, 4, null, null, null, DateTime.Now);
     beea = new BuildErrorEventArgs(null, null, null, 1, 2, 3, 4, null, null, null, DateTime.Now, null);
 }
Example #16
0
		public static void LogErrorWithFilename (this Engine engine, string filename, string message,
				     params object[] messageArgs)
		{
			if (message == null)
				throw new ArgumentNullException ("message");
				
			BuildErrorEventArgs beea = new BuildErrorEventArgs (
				null, null, filename, 0, 0, 0, 0, FormatString (message, messageArgs),
				null, null);
			engine.EventSource.FireErrorRaised (engine, beea);
		}
Example #17
0
        public virtual string FormatErrorEvent(BuildErrorEventArgs args)
        {
            StringBuilder sb = new StringBuilder ();

            sb.Append (args.File);
            AppendLineNumbers (sb, args.LineNumber, args.ColumnNumber, args.EndLineNumber, args.EndColumnNumber);
            sb.Append (": ");
            sb.Append (args.Subcategory);
            sb.Append (" error ");
            sb.Append (args.Code);
            sb.Append (": ");
            sb.Append (args.Message);

            return sb.ToString ();
        }
Example #18
0
 public SharpBuildErrorEvent(BuildErrorEventArgs arg)
     : base(SharpBuildEventType.ErrorLog)
 {
     if (arg != null)
     {
         Code = arg.Code;
         ColumnNumber = arg.ColumnNumber;
         EndColumnNumber = arg.EndColumnNumber;
         EndLineNumber = arg.EndLineNumber;
         File = arg.File;
         LineNumber = arg.LineNumber;
         ProjectFile = arg.ProjectFile;
         Message = arg.Message;
     }
 }
        /// <summary>
        /// Logs an error event for the current task
        /// </summary>
        /// <param name="e">The event args</param>
        public void LogErrorEvent(Microsoft.Build.Framework.BuildErrorEventArgs e)
        {
            ErrorUtilities.VerifyThrowArgumentNull(e, "e");
            VerifyActiveProxy();

            // If we are in building across process we need the events to be serializable. This method will
            // check to see if we are building with multiple process and if the event is serializable. It will
            // also log a warning if the event is not serializable and drop the logging message.
            if (IsRunningMultipleNodes && !IsEventSerializable(e))
            {
                return;
            }

            e.BuildEventContext = _loggingContext.BuildEventContext;
            _loggingContext.LoggingService.LogBuildEvent(e);
        }
Example #20
0
        public void LogErrorEvent(BuildErrorEventArgs eventArgs)
        {
            if (eventArgs.File != null && eventArgs.File.Length > 0)
            {
                Console.Write("{0}({1},{2}): ", eventArgs.File, eventArgs.LineNumber, eventArgs.ColumnNumber);
            }

            Console.Write("ERROR: ");
            _log += "ERROR: ";
            Console.Write("ERROR " + eventArgs.Code + ": ");
            _log += "ERROR " + eventArgs.Code + ": ";
            ++_errors;

            Console.WriteLine(eventArgs.Message);
            _log += eventArgs.Message;
            _log += "\n";
        }
Example #21
0
        public static void LogError(this Engine engine, string subcategory, string errorCode,
				      string helpKeyword, string file,
				      int lineNumber, int columnNumber,
				      int endLineNumber, int endColumnNumber,
				      string message,
				      params object[] messageArgs)
        {
            if (message == null)
                throw new ArgumentNullException ("message");

            BuildErrorEventArgs beea = new BuildErrorEventArgs (
                subcategory, errorCode, file, lineNumber,
                columnNumber, endLineNumber, endColumnNumber,
                FormatString (message, messageArgs), helpKeyword /*it's helpKeyword*/,
                null /*it's senderName*/);

            engine.EventSource.FireErrorRaised (engine, beea);
        }
        public void LogErrorEvent(BuildErrorEventArgs eventArgs)
        {
            if (eventArgs.File != null && eventArgs.File.Length > 0)
            {
                if (logToConsole)
                    Console.Write("{0}({1},{2}): ", eventArgs.File, eventArgs.LineNumber, eventArgs.ColumnNumber);
                log += String.Format(CultureInfo.InvariantCulture, "{0}({1},{2}): ", eventArgs.File, eventArgs.LineNumber, eventArgs.ColumnNumber);
            }

            if (logToConsole)
                Console.Write("ERROR " + eventArgs.Code + ": ");
            log += "ERROR " + eventArgs.Code + ": ";
            ++errors;

            if (logToConsole)
                Console.WriteLine(eventArgs.Message);
            log += eventArgs.Message;
            log += "\n";
        }
Example #23
0
		public void TestFormatErrorEvent1 ()
		{
			LoggerExtension le = new LoggerExtension ();
			string subcategory = "subcategory";
			string code = "code";
			string file = "file";
			int lineNumber = 1;
			int columnNumber = 2;
			int endLineNumber = 3;
			int endColumnNumber = 4;
			string message = "message";
			string helpKeyword = "helpKeyword";
			string senderName = "senderName";

			BuildErrorEventArgs beea = new BuildErrorEventArgs (
				subcategory, code, file, lineNumber, columnNumber,
				endLineNumber, endColumnNumber, message, helpKeyword, senderName);

			Assert.AreEqual ("file(1,2,3,4): subcategory error code: message", le.FormatErrorEvent (beea), "A1");
		}
        public static bool LogMessage(IBuildEngine buildEngine, BuildMessageEventArgs args)
        {
            bool success = true;
            if (args.Importance == MessageImportance.High)
            {
                int index = 0;
                using (TextReader reader = new StringReader(args.Message))
                {
                    for (string line = reader.ReadLine(); line != null; line = reader.ReadLine())
                    {
                        Match match = tsLintRegex.Match(line);
                        if (match.Success)
                        {
                            int lineNumber = int.Parse(match.Groups["LineNumber"].Value);
                            int columnNumber = int.Parse(match.Groups["ColumnNumber"].Value);
                            BuildErrorEventArgs errorArgs = new BuildErrorEventArgs(
                                string.Empty,
                                string.Empty,
                                match.Groups["FileName"].Value,
                                lineNumber,
                                columnNumber,
                                0,
                                0,
                                match.Groups["End"].Value,
                                string.Empty,
                                string.Empty);
                            buildEngine.LogErrorEvent(errorArgs);
                            success = false;
                            index++;
                            if (index == 100)
                            {
                                break;
                            }
                        }
                    }
                }
            }

            buildEngine.LogMessageEvent(args);
            return success;
        }
Example #25
0
        public override bool Execute()
        {
            try
            {

                TFVC _tfs = new TFVC();
                bool _changesetsFound = false;
                foreach (string _vcPath in _tfs.GetWorkspaceWorkingFolderServerMappings(_ws, _owner))
                {
                    BuildMessageEventArgs _bmsg = new BuildMessageEventArgs("Checking: " + _vcPath, "help", null, MessageImportance.Low);
                    BuildEngine.LogMessageEvent(_bmsg);
                    if (_tfs.Check4ChangeSetsSinceLabel(_lastGoodBuild, _vcPath))
                    {
                        BuildEngine.LogMessageEvent(new BuildMessageEventArgs("Changesets founds[" + _tfs.ChangesetsFoundCount + "]: " + _tfs.ChangesetsFound, "help", null, MessageImportance.Low));
                        _changesetsFound = true;
                        break;
                    }
                }

                if (_changesetsFound)
                {
                    return true;
                }
                else
                {
                    BuildErrorEventArgs _berror = new BuildErrorEventArgs("No Changes since last good build", "HIC:4201", null, 0, 0, 0, 0, "No changessets were found since the " + _lastGoodBuild, null, null);
                    BuildEngine.LogErrorEvent(_berror);
                    return false;
                }

            }
            catch (Exception _ex)
            {
                BuildErrorEventArgs _berr = new BuildErrorEventArgs(_ex.Message, _ex.StackTrace, _ex.Source, 0, 0, 0, 0, _ex.Message, _ex.HelpLink, null);
                BuildEngine.LogErrorEvent(_berr);
                return false;
            }
        }
Example #26
0
        /*
         * Method:    ErrorHandler
         *
         * This is the delegate for error events.
         *
         */
        private void ErrorHandler(
            object sender,
            BuildErrorEventArgs errorEvent)
        {

            CompilerError e = new CompilerError(errorEvent.File,
                                                errorEvent.LineNumber,
                                                errorEvent.ColumnNumber,
                                                errorEvent.Code,
                                                errorEvent.Message); 
            e.IsWarning = false;

            // Format error so that flush to task pane can understand it
            NativeMethods.ThrowOnFailure(_output.OutputTaskItemString(
                                        this.GetFormattedErrorMessage(e),
                                        VSTASKPRIORITY.TP_HIGH,
                                        VSTASKCATEGORY.CAT_BUILDCOMPILE,
                                        String.Empty,
                                        -1,
                                        errorEvent.File,
                                        (uint)errorEvent.LineNumber,
                                        errorEvent.Message));
        }
Example #27
0
 private void eventSource_ErrorRaised(object sender, Microsoft.Build.Framework.BuildErrorEventArgs e)
 {
     errorsCount++;
     this.AddNode(String.Format("MSBUILD : error {0} : {1}", e.Code, e.Message));
 }
Example #28
0
 public void LogErrorEvent(Microsoft.Build.Framework.BuildErrorEventArgs e)
 {
 }
 internal override void OutputError(object sender, BuildErrorEventArgs e)
 {
     if (GetHeaderOnlyFirstTyme() != null) { logStream.WriteLine(GetHeaderOnlyFirstTyme()); }
     logStream.WriteLine(FormatErrorEvent(e));
 }
Example #30
0
 /// <summary>
 /// Handles error notification events by storing the error message string.
 /// </summary>
 void ErrorRaised(object sender, BuildErrorEventArgs e)
 {
     errors.Add(e.Message);
 }
Example #31
0
			void OnError(object sender, BuildErrorEventArgs e)
			{
				AppendError(e.File, e.LineNumber, e.ColumnNumber, e.Code, e.Message, e.ProjectFile, e.Subcategory, e.HelpKeyword, false);
			}
Example #32
0
 /// <summary>
 /// This is the delegate for error events.
 /// </summary>
 protected virtual void ErrorHandler(object sender, BuildErrorEventArgs errorEvent)
 {
     // NOTE: This may run on a background thread!
     QueueOutputText(GetFormattedErrorMessage(errorEvent.File, errorEvent.LineNumber, errorEvent.ColumnNumber, false, errorEvent.Code, errorEvent.Message));
     QueueTaskEvent(errorEvent);
 }
Example #33
0
 void eventSource_ErrorRaised(object sender, BuildErrorEventArgs e)
 {
     LogErrorOrWarning(XmlLoggerElements.Error, e.Message, e.Code, e.File, e.LineNumber, e.ColumnNumber, e.Timestamp);
 }
Example #34
0
		void LogError (string message, params object [] messageArgs)
		{
			if (message == null)
				throw new ArgumentException ("message");

			BuildErrorEventArgs beea = new BuildErrorEventArgs (
				null, null, null, 0, 0, 0, 0, String.Format (message, messageArgs),
				null, null);
			engine.EventSource.FireErrorRaised (this, beea);
		}
Example #35
0
        /// <summary>
        /// Logs an error event for the current task
        /// Thread safe.
        /// </summary>
        /// <param name="e">The event args</param>
        public void LogErrorEvent(Microsoft.Build.Framework.BuildErrorEventArgs e)
        {
            lock (_callbackMonitor)
            {
                ErrorUtilities.VerifyThrowArgumentNull(e, "e");

                if (!_activeProxy)
                {
                    // The task has been logging on another thread, typically
                    // because of logging a spawned process's output, and has
                    // not terminated this logging before it returned. This is common
                    // enough that we don't want to crash and break the entire build. But
                    // we don't have any good way to log it any more, as not only has this task
                    // finished, the whole build might have finished! The task author will
                    // just have to figure out that their task has a bug by themselves.
                    if (s_breakOnLogAfterTaskReturns)
                    {
                        Trace.Fail(String.Format(CultureInfo.CurrentUICulture, "Task at {0}, after already returning, attempted to log '{1}'", _taskLocation.ToString(), e.Message));
                    }

                    return;
                }

                // If we are in building across process we need the events to be serializable. This method will
                // check to see if we are building with multiple process and if the event is serializable. It will
                // also log a warning if the event is not serializable and drop the logging message.
                if (IsRunningMultipleNodes && !IsEventSerializable(e))
                {
                    return;
                }

                if (_convertErrorsToWarnings)
                {
                    // Convert the error into a warning.  We do this because the whole point of
                    // ContinueOnError is that a project author expects that the task might fail,
                    // but wants to ignore the failures.  This implies that we shouldn't be logging
                    // errors either, because you should never have a successful build with errors.
                    BuildWarningEventArgs warningEvent = new BuildWarningEventArgs
                                                         (
                        e.Subcategory,
                        e.Code,
                        e.File,
                        e.LineNumber,
                        e.ColumnNumber,
                        e.EndLineNumber,
                        e.EndColumnNumber,
                        e.Message,
                        e.HelpKeyword,
                        e.SenderName
                                                         );

                    warningEvent.BuildEventContext = _taskLoggingContext.BuildEventContext;
                    _taskLoggingContext.LoggingService.LogBuildEvent(warningEvent);

                    // Log a message explaining why we converted the previous error into a warning.
                    _taskLoggingContext.LoggingService.LogComment(_taskLoggingContext.BuildEventContext, MessageImportance.Normal, "ErrorConvertedIntoWarning");
                }
                else
                {
                    e.BuildEventContext = _taskLoggingContext.BuildEventContext;
                    _taskLoggingContext.LoggingService.LogBuildEvent(e);
                    _taskLoggingContext.HasLoggedErrors = true;
                }
            }
        }
Example #36
0
 private void eventSource_ErrorRaised(object sender, Microsoft.Build.Framework.BuildErrorEventArgs e)
 {
     errorsCount++;
     textBox.Text += Environment.NewLine + e.Message;
 }