public virtual int SetHostObject(string targetName, string taskName, object hostObject)
{
Debug.Assert(targetName != null && taskName != null && this.buildProject != null && this.buildProject.Targets != null);
if (targetName == null || taskName == null || this.buildProject == null || this.buildProject.Targets == null)
{
return VSConstants.E_INVALIDARG;
}
this.buildProject.ProjectCollection.HostServices.RegisterHostObject(this.buildProject.FullPath, targetName, taskName, (Microsoft.Build.Framework.ITaskHost)hostObject);
return VSConstants.S_OK;
}