Build Method

Home Page (Objects)OverviewFAQReference

Applies to: Application object

Builds a specified configuration by processing only the files that have changed.

Syntax

object**.Build** [configuration]

Parameters

object

An expression that evaluates to an Application object. When you use the Build method of the Application object, you can omit object because the name of the Application object is implied when you access its properties and methods.

configuration

(Optional) An object of type Configuration. If this is left off, the active configuration will be cleaned instead.

Remarks

If you do not specify a configuration, Developer Studio builds the default configuration. For example, if you specify Application.Build, Developer Studio builds the default.

To find the appropriate configuration:

  1. Locate the project with that configuration by iterating through the Projects collection, using the Projects property of the Application object.

  2. Locate the appropriate configuration by iterating through the project's Configurations collection, using the Configurations property of the BuildProject object.

Example

The following example iterates through all the configurations on every build project and performs a build on each configuration:

Sub BuildEveryConfiguration
Dim projCol
Dim configCol
Dim numProjects
Dim numConfigs
Dim i
Dim j
set projCol = Projects
numProjects = projCol.Count
For i=1 To numProjects
   Dim proj
   set proj = projCol(i)
   If proj.Type = "Build" Then
      set configCol = proj.Configurations
      numConfigs = configCol.Count
      For j=1 to numConfigs
         Dim config
         set config = configCol(j)
         Build config
      Next
   End If
Next
End Sub

See Also   Configuration object, RebuildAll method, Clean method. ActiveConfiguration property.