MsBuild
The msbuild command is used to execute Microsoft's MsBuild
build tool. It provides a convenient way to execute msbuild, and applies an msbuild post-processor to the command output by default. The msbuild command is based on the executable command, thus all attributes and child elements valid for the executable command are also valid for the ant command.
Finding the msbuild executable
The msbuild command will try the following values for the msbuild executable:
- if a binary is specified explictly using the exe attribute, that value will be used
- if a property named "msbuild.bin" exists, the value of that property will be used
- otherwise, the value "MsBuild.exe" will be used (and thus MsBuild.exe must be found in the PATH of the pulse™ process)
The "msbuild.bin" property may be made available by an automatically-discovered (or manually created) ant resource.
Attributes
| Attribute |
Description |
Required? |
Default |
| build-file |
The msbuild build file to use. |
No |
Left to msbuild (looks for files ending in ".proj") |
| configuration |
The configuration to build, e.g. Release. |
No |
Specified in the build file. |
| post-process |
If true, run msbuild post-processing, if false run no post-processing. |
No |
true |
| targets |
A space-separated list of targets to execute. |
No |
Specified in the build file. |
See also executable.
Child Elements
| Element |
Description |
Number |
| build-property |
Used to define an MsBuild build property. |
0 or more |
See also executable.
Examples
Execute the "build" target from the default build file:
<msbuild name="build" targets="build"/>
Execute targets "build" and "test" from a custom build file, in configuration "debug", with property "foo" set to "bar":
<msbuild name="test" build-file="myproject.proj" targets="build test" configuration="Debug">
<build-property name="foo" value="bar"/>
</msbuild>