TaskLoggingHelper.LogMessageFromResources Method

Definition

Logs a message with the specified resource string.

Overloads

LogMessageFromResources(String, Object[])

Logs a message using the specified resource string. Thread safe.

LogMessageFromResources(MessageImportance, String, Object[])

Logs a message of the given importance using the specified resource string. Thread safe.

LogMessageFromResources(String, Object[])

Source:
TaskLoggingHelper.cs

Logs a message using the specified resource string. Thread safe.

C#
public void LogMessageFromResources(string messageResourceName, params object[] messageArgs);
C#
[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
public void LogMessageFromResources(string messageResourceName, params object[] messageArgs);

Parameters

messageResourceName
String

The name of the string resource to load.

messageArgs
Object[]

Optional arguments for formatting the loaded string.

Attributes

Exceptions

Thrown when messageResourceName is null.

Remarks

The MessageImportance value of a message is Normal by default.

Applies to

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

LogMessageFromResources(MessageImportance, String, Object[])

Source:
TaskLoggingHelper.cs

Logs a message of the given importance using the specified resource string. Thread safe.

C#
public void LogMessageFromResources(Microsoft.Build.Framework.MessageImportance importance, string messageResourceName, params object[] messageArgs);

Parameters

importance
MessageImportance

The importance level of the message.

messageResourceName
String

The name of the string resource to load.

messageArgs
Object[]

Optional arguments for formatting the loaded string.

Exceptions

Thrown when messageResourceName is null.

Remarks

Take care to order the parameters correctly or the other overload will be called inadvertently.

Applies to

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