AsyncExec ClassMSBuild 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

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

  NameDescription
Public methodAsyncExec
Top
Methods

  NameDescription
Public methodExecute
Executes the build operation.
(Overrides TaskExecute.)
Top
Properties

  NameDescription
Public propertyCommand
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.
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">
    <MSBuild.ExtensionPack.Framework.AsyncExec Command="iisreset.exe"/>
    <MSBuild.ExtensionPack.Framework.AsyncExec Command="copy &quot;d:\a\*&quot; &quot;d:\b\&quot; /Y"/>
  </Target>
</Project>
See Also

Reference