Home Page (Objects) | Overview | FAQ | Reference
Applies to: Application object
Cleans a specified configuration by deleting all intermediate and output files generated by the configuration.
Syntax
object.Clean [configuration]
Parameters
object
An expression that evaluates to an Application object.
configuration
(Optional) A string constant of type Configuration that specifies the configuration to clean. Possible values appear in the Default Project Configuration box. The default value is Nothing.
Remarks
If you do not specify a configuration, Developer Studio cleans the default configuration. For example, if you specify Application.Clean, Developer Studio cleans 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 cleans each configuration in every build project:
Sub CleanEveryConfiguration
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)
Clean config
Next
End If
Next
End Sub
See Also Configuration object, Build method, RebuildAll method.