Unless I've grossly misunderstood MSBuild, tasks are executed in the document order in which they appear within a 'Target' node.
I'd like to be able to specify that two tasks (such as xcopy tasks) could run in parallel. I was expecting there to be a 'Parallel' task or something...?
MSBuild can take advantage of systems that have multiple processors, or multiple-core processors. A separate build process is created for each available processor. For example, if the system has four processors, then four build processes are created.
You can use MSBuild to build multiple projects faster by running them in parallel. To run builds in parallel, you use the following settings on a multi-core or multiple processor computer: The -maxcpucount switch at a command prompt. The BuildInParallel task parameter on an MSBuild task.
To execute a task in an MSBuild project file, create an element with the name of the task as a child of a Target element. If a task accepts parameters, these are passed as attributes of the element. Tasks can also return information to the project file, which can be stored in items or properties for later use.
Try the new parallel task in the MSBuild Extension Pack - http://mikefourie.wordpress.com/2012/02/29/executing-msbuild-targets-in-parallel-part-1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With