Share via


RebuildAll Method

Home Page (Objects)OverviewFAQReference

Applies to: Application object

Rebuilds a specified configuration by processing all files in the configuration, whether or not the files have changed.

Syntax

object**.RebuildAll** [configuration]

Parameters

object

An expression that evaluates to an Application object. When you use the RebuildAll 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) A string constant of type Configuration that specifies the type of configuration. Possible values appear in the Default Project Configuration box. The default value is Nothing.

Remarks

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

To find the appropriate configuration, first locate the project with that configuration by iterating through the Projects collection, using the Projects property of the Application object. Once you find the project, locate the appropriate configuration by iterating through the project's Configurations collection, using the Configurations property of the BuildProject object.

Example

The following example rebuilds each configuration in every build project:

Sub RebuildEveryConfiguration
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)
         RebuildAll config
      Next
   End If
Next
End Sub

See Also   Configuration object, Build method, Clean method.