SmartExec Class | MSBuild Extension Pack Help 4.0.12.0 |
Runs a specified program or command without blocking the UI. This is similar to
the Exec Task: http://msdn.microsoft.com/en-us/library/x8zx72cd.aspx.
This task is useful when you need to run a long command-line task during the build process.
Inheritance Hierarchy
Microsoft.Build.UtilitiesAppDomainIsolatedTask
MSBuild.ExtensionPackBaseAppDomainIsolatedTask
MSBuild.ExtensionPack.FrameworkSmartExec
Namespace: MSBuild.ExtensionPack.Framework
Assembly: MSBuild.ExtensionPack (in MSBuild.ExtensionPack.dll) Version: 4.0.0.0
The SmartExec type exposes the following members.
Constructors
Name | Description | |
---|---|---|
SmartExec |
Properties
Name | Description | |
---|---|---|
Command |
Gets or sets the command(s) to run. These can be system commands,
such as attrib, or an executable, such as program.exe, runprogram.bat, or setup.msi.
This parameter can contain multiple lines of commands (each command on a new-line).
Alternatively, you can place multiple commands in a batch file and run it using this parameter.
| |
IgnoreExitCode |
Gets or sets a value indicating whether to ignore the command exit code.
If true, the task ignores the exit code provided by the executed command.
Otherwise, the task returns false if the executed command returns an exit code
that does not match SuccessExitCode.
| |
SuccessExitCode |
Gets or sets the success exit code for the command. Default is zero (0).
|
Examples
<Project ToolsVersion="3.5" 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"> <MSBuild.ExtensionPack.Framework.SmartExec Command="iisreset.exe"/> <MSBuild.ExtensionPack.Framework.SmartExec Command="copy "d:\a\*" "d:\b\" /Y"/> </Target> </Project>
See Also