AsyncExec Class | MSBuild Extension Pack Help 4.0.12.0 |
Asynchronously runs a specified program or command with no arguments. 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 fire-and-forget command-line task during the build process.
Note that that is a fire and forget call. No errors are handled.
Inheritance Hierarchy
MSBuild.ExtensionPack.FrameworkAsyncExec
Namespace: MSBuild.ExtensionPack.Framework
Assembly: MSBuild.ExtensionPack (in MSBuild.ExtensionPack.dll) Version: 4.0.0.0
The AsyncExec type exposes the following members.
Constructors
Name | Description | |
---|---|---|
AsyncExec |
Methods
Name | Description | |
---|---|---|
Execute |
Executes the build operation.
(Overrides TaskExecute.) |
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.
|
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"> <MSBuild.ExtensionPack.Framework.AsyncExec Command="iisreset.exe"/> <MSBuild.ExtensionPack.Framework.AsyncExec Command="copy "d:\a\*" "d:\b\" /Y"/> </Target> </Project>
See Also