Incredibuild Support has moved! Come join us at:

Incredibuild Support

Breaking Custom Steps and Build Events into Multiple Tasks
Posted by Yoni Davidson, Last modified by Yoni Davidson on 29 January 2018 01:25 PM

Sometimes a custom build step, build event or a build tool can be further broken down to smaller tasks, and parallelized to achieve further acceleration.

This method can be used in Visual Studio versions 2010 and higher, and allows the distribution and parallelization of the contents of the build steps, on the process level.

This feature is only available in scenarios where:
1. The IncrediBuild predicted feature (on by default) is not turned off.
2. The IncrediBuild UseMSBuild directive is not used.
3. The build is not executed with "build regardless of errors".

Example 1: If within a custom step a user executes a complete Make command that builds a complete project, you can instruct IncrediBuild to highly accelerate your Make command execution by using the IncrediBuild Make and Build Tools package. Instead of treating the Make command as a single task, IncrediBuild will instead “break” this command to its sub-tasks and will execute the compilation in a parallel and distributed manner.

Example 2: In the case that you have a custom step, which has a tool that runs many rendering commands, you can use Profile XML not only to distribute the rendering but also to intercept the tool that spawns the rendering processes. In this case, you can expand IncrediBuild’s Profile XML, as described below, to control and also accelerate and distribute custom steps, rules, and events.

You can integrate Profile XML file into Visual Studio 2010 and later, provided that you have the appropriate package (Dev Tools (see IncrediBuild for Dev Tools) or Make and Other Build Tools (see IncrediBuild for Make and Other Build Tools)). Integrating Profile XML enables you to have complete control on the way IncrediBuild treats the custom tools.

By default, custom steps, exec tasks, and special build tools are not distributed to remote agents.
In order to allow IncrediBuild to distribute and manage these tasks, an XML file should be used based on IncrediBuild's Automatic Interception interface.
There are two ways in which a profile.xml file can be used in order to manage such tasks:

  1. In the IncrediBuild BuildConsole command, use the /profile directive to specify a profile for IncrediBuild to use: /profile=[profile_file_name].xml (without the square brackets characters).
  2. If you are building from within the Visual Studio IDE or would like your solution to have a default profile to use, per solution, create [solution_folder]\[solution_name].ib_profile.xmlprofile xml file This profile will be automatically loaded by IncrediBuild in case that no profile file was specified with the /profile=[profile_file_name].xml switch.

The following XML file instructs IncrediBuild to distribute every "gawk" task that is executed by the build. Note that even though the real file is "gawk.exe", we do not specify the file extension:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Profile FormatVersion="1">
<Tool Filename="gawk" AllowRemote="true" />

If your Custom Build Steps and Build Events appear as a single task (single bar in the build monitor labeled “IBCustomStep” ) after adding the profile.xml file, please change the registry value CustomStepVs10Support from the default “1” to “0” under the HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Xoreax\IncrediBuild\Builder registry key.

(0 vote(s))
This article was helpful
This article was not helpful

Comments (0)
Post a new comment
Full Name:
Help Desk Software by Kayako