Configurations Property

Home Page (Objects)OverviewFAQReference

Applies to: BuildProject object, Configuration object

Gets the Configurations object.

Syntax

object**.Configurations**

Parameters

object

An expression that evaluates to a BuildProject object or a Configuration object.

Remarks

The Configurations property has the Configurations type.

The Configurations object represents the collection of configurations associated with a project.

For BuildProject.Configurations, the Configurations object will contain the list of all configurations on the project.

For Configuration.Configurations, the Configurations object will contain the matching configuration on each dependent project (subproject) of this configuration's project. For example, if the project named "MyMainProj" has dependent projects Sub1 and Sub2, then the Configurations collection on the Debug configuration of MyMainProj will contain the Debug configuration for Sub1 and the Debug configuration for Sub2.

Each configuration in this collection is represented by a Configuration object.

Example

The following example performs a build on each configuration in every build project:

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