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(System::String ^ projectFile, System::String ^ targetName, System::String ^ taskName);
public Microsoft.Build.Framework.ITaskHost GetHostObject (string projectFile, string targetName, string taskName);
member this.GetHostObject : string * string * string -> Microsoft.Build.Framework.ITaskHost
Public Function GetHostObject (projectFile As String, targetName As String, taskName As String) As ITaskHost

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