Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

TaskLoggingHelper.LogMessageFromText Method

Logs an error message or warning from the given line of text.

Namespace:  Microsoft.Build.Utilities
Assembly:  Microsoft.Build.Utilities.v4.0 (in Microsoft.Build.Utilities.v4.0.dll)

public bool LogMessageFromText(
	string lineOfText,
	MessageImportance messageImportance


Type: System.String

The line of text to log from.

Type: Microsoft.Build.Framework.MessageImportance

One of the values of MessageImportance that indicates the importance level of the command line.

Return Value

Type: System.Boolean
true if an error was logged; otherwise, false.


lineOfText is null.

Errors messages and warnings are only logged for lines that fit the canonical format. All other lines are treated as messages.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0
© 2015 Microsoft