ToolTaskExtension Base Class

 

For the latest documentation on Visual Studio 2017, see Visual Studio 2017 Documentation.

For the latest documentation on Visual Studio 2017, see ToolTaskExtension Base Class on docs.microsoft.com. Many tasks inherit from the ToolTaskExtension class, which inherits from the ToolTask class, which itself inherits from the Task class. This inheritance chain adds several parameters to the tasks that derive from them. These parameters are listed in this document.

The following table describes the parameters of the base classes.

ParameterDescription
BuildEngineOptional IBuildEngine parameter.

Specifies the build engine interface available to tasks. The build engine automatically sets this parameter to allow tasks to call back into it.
BuildEngine2Optional IBuildEngine2 parameter.

Specifies the build engine interface available to tasks. The build engine automatically sets this parameter to allow tasks to call back into it.

This is a convenience property so that task authors inheriting from this class do not have to cast the value from IBuildEngine to IBuildEngine2.
BuildEngine3Optional IBuildEngine3 parameter.

Specifies the build engine interface provided by the host.
EchoOffOptional bool parameter.

When set to true, this task passes /Q to the cmd.exe command line such that the command line does not get copied to stdout.
EnvironmentVariablesOptional String array parameter.

Array of pairs of environment variables, separated by equal signs. These variables are passed to the spawned executable in addition to, or selectively overriding, the regular environment block.
ExitCodeOptional Int32 output read-only parameter.

Specifies the exit code that is provided by the executed command. If the task logged any errors, but the process had an exit code of 0 (success), this is set to -1.
HostObjectOptional ITaskHost parameter.

Specifies the host object instance (can be null). The build engine sets this property if the host IDE has associated a host object with this particular task.
LogOptional TaskLoggingHelper read-only parameter.

Gets an instance of a TaskLoggingHelperExtension class that contains task logging methods.
LogStandardErrorAsErrorOption bool parameter.

If true, all messages received on the standard error stream are logged as errors.
StandardErrorImportanceOptional String parameter.

Importance with which to log text from the standard out stream.
StandardOutputImportanceOptional String parameter.

Importance with which to log text from the standard out stream.
TimeoutVirtual optional Int32 parameter.

Specifies the amount of time, in milliseconds, after which the task executable is terminated. The default value is Int.MaxValue, indicating that there is no time out period.Time-out is in milliseconds.
ToolExeVirtual optional string parameter.

Projects may implement this to override a ToolName. Tasks may override this to preserve the ToolName.
ToolPathOptional string parameter.

Specifies the location from where the task loads the underlying executable file. If this parameter is not specified, the task uses the SDK installation path that corresponds to the version of the framework that is running MSBuild.
UseCommandProcessorOptional bool parameter.

When set to true, this task creates a batch file for the command line and executes it by using the command-processor instead of executing the command directly.
YieldDuringToolExecutionOptional bool parameter.

When set to true, this task yields the node when its task is executing.

Task Reference
Tasks

Show: