GenericTool ClassMSBuild Extension Pack Help 4.0.12.0
This task can be used to wrap any executable
Inheritance Hierarchy

SystemObject
  Microsoft.Build.UtilitiesTask
    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

  NameDescription
Public methodGenericTool
Top
Properties

  NameDescription
Public propertyErrorExitCodes
The list of Error Exit Codes
Public propertyExecutable
The Executable to call
Public propertyLogToConsole
Set to true to log output to the console. Default is false
Public propertyParameters
Sets the parameters to pass to the Executable. The parameter should be defined in the 'value' metadata of an Item.
Public propertyRealExitCode
The real exit code returned from the Executable
Public propertySuccessExitCodes
The list of Success Exit Codes
Public propertyWarningExitCodes
The list of Warning Exit Codes
Top
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

Reference