HostServices.GetHostObject(String, String, String) Method

Definition

Gets any host object applicable to this task name where the task appears within a target and project with the specified names. If no host object exists, returns null.

public Microsoft.Build.Framework.ITaskHost GetHostObject (string projectFile, string targetName, string taskName);

Parameters

projectFile
String

The name of the project file.

targetName
String

The name of the target.

taskName
String

The task name associated with the host service.

Returns

The host service for the given task where the task appears within a target and project with the given names. If no host service exists, returns null.

Applies to