ITaskFactory.Initialize Method (String, IDictionary<String, TaskPropertyInfo>, String, IBuildEngine)


Initializes this factory for instantiating tasks with a particular inline task block.

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.Framework
Assembly:  Microsoft.Build.Framework (in Microsoft.Build.Framework.dll)

bool Initialize(
	string taskName,
	IDictionary<string, TaskPropertyInfo> parameterGroup,
	string taskBody,
	IBuildEngine taskFactoryLoggingHost


Type: System.String

Name of the task.

Type: System.Collections.Generic.IDictionary<StringTaskPropertyInfo>

The parameter group.

Type: System.String

The task body.

Type: Microsoft.Build.Framework.IBuildEngine

The task factory logging host.

Return Value

Type: System.Boolean

A value indicating whether initialization was successful.

The MSBuild engine calls this method to initialize the factory. After initialization, the factory can be asked whether or not task names can be created by the factory.

The taskFactoryLoggingHost will log messages in the context of the target where the task is first used.

Return to top