HostObjectInitializationStatus 枚举


定义在尝试初始化宿主对象后 ToolTask 的下一步操作。Defines the next action for ToolTask after an attempt to initialize the host object.

public enum class HostObjectInitializationStatus
public enum HostObjectInitializationStatus
type HostObjectInitializationStatus = 
Public Enum HostObjectInitializationStatus


NoActionReturnFailure 3

指示正传入到任务的某些参数无效,且任务应立即失败。Indicates that some of the parameters being passed into the task are invalid, and that the task should fail immediately.

NoActionReturnSuccess 2

指示该主机对象是最新的且无需进一步操作。Indicates that the host object is up to date, and that no further action is necessary.

UseAlternateToolToExecute 1

指示宿主对象不可用,或宿主对象不能支持此版本所需的全部功能。Indicates that either a host object is not available, or that the host object is not capable of supporting all of the features required for this build. 因此,ToolTask 应回退到版本的替代执行方式,如调用命令行工具。Therefore, ToolTask should fallback to an alternate means of doing the build, such as invoking the command-line tool.

UseHostObjectToExecute 0

指示存在适用于此任务的宿主对象,它可支持所有传入的参数,并应被调用来执行任务的实际工作。Indicates that an appropriate host object for this task exists, which can support all of the parameters passed in and should be invoked to do the real work of the task.


HostObjectInitializationStatusToolTask类的InitializeHostObject方法的返回类型。HostObjectInitializationStatus is the return type of the InitializeHostObject method of the ToolTask class.