TaskLoggingHelper::FormatResourceString Method (String^, array<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:
virtual String^ FormatResourceString(
	String^ resourceName,
	... array<Object^>^ args
)

Parameters

resourceName
Type: System::String^

The name of the string resource to load.

args
Type: array<System::Object^>^

Optional arguments for formatting the loaded string.

Return Value

Type: System::String^

The formatted string.

Exception Condition
ArgumentException

The string resource indicated by resourceName does not exist.

InvalidOperationException

The TaskResources property of the owner task is not set.

ArgumentNullException

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
Show: