Sets the host object for a given build target and build task.
Namespace: Microsoft.VisualStudio.Package
Assembly: MPF.Project.NonShipping (in MPF.Project.NonShipping.dll)
Syntax
'宣言
Public Overridable Function SetHostObject ( _
targetName As String, _
taskName As String, _
hostObject As Object _
) As Integer
'使用
Dim instance As ProjectNode
Dim targetName As String
Dim taskName As String
Dim hostObject As Object
Dim returnValue As Integer
returnValue = instance.SetHostObject(targetName, _
taskName, hostObject)
public virtual int SetHostObject(
string targetName,
string taskName,
Object hostObject
)
public:
virtual int SetHostObject(
String^ targetName,
String^ taskName,
Object^ hostObject
)
public function SetHostObject(
targetName : String,
taskName : String,
hostObject : Object
) : int
Parameters
targetName
Type: System.StringThe name of the build target.
taskName
Type: System.StringThe name of the task.
hostObject
Type: System.ObjectThe host object to be set.
Return Value
Type: System.Int32
E_INVALIDARG if targetName or taskName is null or if there is no build project or build targets; E_FAIL if it was not possible to set the host object; if it was possible to set the host object, S_OK.
Implements
IVsProjectBuildSystem.SetHostObject(String, String, Object)
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.