TaskLoggingHelper.LogErrorFromResources Method (String, String, String, String, Int32, Int32, Int32, Int32, String, Object[])
Logs an error using the specified resource string and other error details.
Namespace: Microsoft.Build.Utilities
Assembly: Microsoft.Build.Utilities.v4.0 (in Microsoft.Build.Utilities.v4.0.dll)
public void LogErrorFromResources( string subcategoryResourceName, string errorCode, string helpKeyword, string file, int lineNumber, int columnNumber, int endLineNumber, int endColumnNumber, string messageResourceName, params Object[] messageArgs )
Parameters
- subcategoryResourceName
- Type: System.String
The name of the string resource that describes the error type.
- errorCode
- Type: System.String
The error code.
- helpKeyword
- Type: System.String
The Help keyword to associate with the error.
- file
- Type: System.String
The path to the file containing the error.
- lineNumber
- Type: System.Int32
The line in the file where the error occurs.
- columnNumber
- Type: System.Int32
The column in the file where the error occurs.
- endLineNumber
- Type: System.Int32
The end line in the file where the error occurs.
- endColumnNumber
- Type: System.Int32
The end column in the file where the error occurs.
- messageResourceName
- Type: System.String
The name of the string resource to load.
- messageArgs
- Type: System.Object[]
The arguments for formatting the loaded string.
| Exception | Condition |
|---|---|
| ArgumentNullException | messageResourceName is null. |
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.