TaskLoggingHelper.LogCriticalMessage Method

Definition

Logs a critical message using the specified string and other message details. Thread safe.

C#
public void LogCriticalMessage(string subcategory, string code, string helpKeyword, string file, int lineNumber, int columnNumber, int endLineNumber, int endColumnNumber, string message, params object[] messageArgs);

Parameters

subcategory
String

Description of the warning type (can be null).

code
String

Message code (can be null).

helpKeyword
String

The help keyword for the host IDE (can be null).

file
String

The path to the file causing the message (can be null).

lineNumber
Int32

The line in the file causing the message (set to zero if not available).

columnNumber
Int32

The column in the file causing the message (set to zero if not available).

endLineNumber
Int32

The last line of a range of lines in the file causing the message (set to zero if not available).

endColumnNumber
Int32

The last column of a range of columns in the file causing the message (set to zero if not available).

message
String

The message string.

messageArgs
Object[]

Optional arguments for formatting the message string.

Exceptions

Thrown when message is null.

Applies to

Product Versions
MSBuild 15, 16, 17
MSBuild (.NET Core) 15, 16, 17