GenericTool Class | MSBuild Extension Pack Help 4.0.12.0 |
This task can be used to wrap any executable
Inheritance Hierarchy
Microsoft.Build.UtilitiesToolTask
MSBuild.ExtensionPack.FrameworkGenericTool
Namespace: MSBuild.ExtensionPack.Framework
Assembly: MSBuild.ExtensionPack (in MSBuild.ExtensionPack.dll) Version: 4.0.0.0
The GenericTool type exposes the following members.
Constructors
Name | Description | |
---|---|---|
GenericTool |
Properties
Name | Description | |
---|---|---|
ErrorExitCodes |
The list of Error Exit Codes
| |
Executable |
The Executable to call
| |
LogToConsole |
Set to true to log output to the console. Default is false
| |
Parameters |
Sets the parameters to pass to the Executable. The parameter should be defined in the 'value' metadata of an Item.
| |
RealExitCode |
The real exit code returned from the Executable
| |
SuccessExitCodes |
The list of Success Exit Codes
| |
WarningExitCodes |
The list of Warning Exit Codes
|
Examples
<Project ToolsVersion="4.0" DefaultTargets="Default" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <TPath>$(MSBuildProjectDirectory)\..\MSBuild.ExtensionPack.tasks</TPath> <TPath Condition="Exists('$(MSBuildProjectDirectory)\..\..\Common\MSBuild.ExtensionPack.tasks')">$(MSBuildProjectDirectory)\..\..\Common\MSBuild.ExtensionPack.tasks</TPath> </PropertyGroup> <Import Project="$(TPath)"/> <Target Name="Default"> <ItemGroup> <Param Include="Source"> <value>c:\b</value> </Param> <Param Include="Destination"> <value>c:\bb 3</value> </Param> <Param Include="Files"> <value>*.*</value> </Param> <Param Include="Options"> <value>/Mir</value> </Param> </ItemGroup> <MSBuild.ExtensionPack.Framework.GenericTool Executable="robocopy.exe" Parameters="@(Param)" SuccessExitCodes="0;1" WarningExitCodes="2;4" ErrorExitCodes="8;16"/> </Target> </Project>
See Also