AddCustomBuildStepToFile Method
Home Page (Objects) | Overview | FAQ | Reference
Applies to: Configuration object
Adds a custom build step to a specified file.
Syntax
object**.AddCustomBuildStepToFile(file,** command**,** output**,** description )
Parameters
object
An expression that evaluates to a Configuration object.
file
A String containing the file name to which you want to add the custom build step.
command
A String containing commands that you want to execute when the given file is out of date with respect to its output. These commands correspond to those in the Commands list in the Custom Build tab and are separated by a newline character. (To get to the Custom Build tab, choose Project: Settings and click the right-arrow.)
output
A String specifying the files you want to create from this custom build step. These files correspond to those in the Outputs list in the Custom Build tab of the Project Settings dialog box, and each file name is separated by a newline character. (In VBScript use Chr(10) to represent a newline character.)
description
A String describing the purpose of the custom build step. This corresponds to the Description box on the Custom Build tab of the Project Settings dialog box (Project menu, Settings command).
Example
The following example adds a custom build step to the readme.txt file in every project in the workspace. In this example, the custom build step makes a copy of the file:
for each proj in Application.Projects
for each cfg in proj.Configurations
cfg.AddCustomBuildStepToFile "ReadMe.txt", "copy ReadMe.txt read.doc", "read.doc", "make this easier to open in word"
next
next