TaskLoggingHelper.FormatResourceString Method (String, Object())


Loads the specified resource string and optionally formats it using the given arguments.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

Namespace:   Microsoft.Build.Utilities
Assembly:  Microsoft.Build.Utilities.Core (in Microsoft.Build.Utilities.Core.dll)

Public Overridable Function FormatResourceString (
	resourceName As String,
	ParamArray args As Object()
) As String


Type: System.String

The name of the string resource to load.

Type: System.Object()

Optional arguments for formatting the loaded string.

Return Value

Type: System.String

The formatted string.

Exception Condition

The string resource indicated by resourceName does not exist.


The TaskResources property of the owner task is not set.


resourceName is null.

The culture of the current thread is used for formatting.

This method requires the owner task to have registered its resources with either the Task base class constructor, or the TaskResources property.

Return to top