TaskLoggingHelper.LogMessagesFromFile Method

Definition

Logs errors, warnings, and messages for each line of text in the given file.

Overloads

LogMessagesFromFile(String)

Logs errors/warnings/messages for each line of text in the given file. Errors/warnings are only logged for lines that fit a particular (canonical) format -- the remaining lines are treated as messages. Thread safe.

LogMessagesFromFile(String, MessageImportance)

Logs errors/warnings/messages for each line of text in the given file. Errors/warnings are only logged for lines that fit a particular (canonical) format -- the remaining lines are treated as messages. Thread safe.

LogMessagesFromFile(String)

Source:
TaskLoggingHelper.cs

Logs errors/warnings/messages for each line of text in the given file. Errors/warnings are only logged for lines that fit a particular (canonical) format -- the remaining lines are treated as messages. Thread safe.

C#
public bool LogMessagesFromFile(string fileName);
C#
[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
public bool LogMessagesFromFile(string fileName);

Parameters

fileName
String

The file to log from.

Returns

true, if any errors were logged

Attributes

Exceptions

Thrown when filename is null.

Remarks

Errors and warnings are logged for lines that fit a particular canonical format. All other lines are logged as messages.

Applies to

MSBuild 17 e altre versioni
Prodotto Versioni
MSBuild 15, 16, 17
MSBuild (.NET Core) 15, 16, 17

LogMessagesFromFile(String, MessageImportance)

Source:
TaskLoggingHelper.cs

Logs errors/warnings/messages for each line of text in the given file. Errors/warnings are only logged for lines that fit a particular (canonical) format -- the remaining lines are treated as messages. Thread safe.

C#
public bool LogMessagesFromFile(string fileName, Microsoft.Build.Framework.MessageImportance messageImportance);

Parameters

fileName
String

The file to log from.

messageImportance
MessageImportance

The importance level for messages that are neither errors nor warnings.

Returns

true, if any errors were logged

Exceptions

Thrown when filename is null.

Remarks

Errors and warnings are logged for lines that fit a particular canonical format. All other lines are logged as messages.

Applies to

MSBuild 17 e altre versioni
Prodotto Versioni
MSBuild 15, 16, 17
MSBuild (.NET Core) 15, 16, 17