RemoveToolSettings Method

Home Page (Objects)OverviewFAQReference

Applies to: Configuration object

Removes the settings of a specified tool, such as the VC++ compiler.

Syntax

object**.RemoveToolSettingstool,** settings

Parameters

object

An expression that evaluates to a Configuration object.

tool

A String that contains the name of the tool whose settings you want to change. For the Visual C++ compiler, specify "cl.exe," and for the linker specify "link.exe."

settings

A String that includes the settings or command-line flags you want to remove from your project makefile. These settings apply to all files in the configuration. You can remove multiple flags by separating them with spaces. For instance, you can specify "/MDd /W3" to remove the compiler flags "/MDd" and "/W3" from the makefile. If you try to remove a flag that does not exist in the makefile, Developer Studio will disregard that entry.

Remarks

The functionality of the RemoveToolSettings method appears on the tabs of the Project Settings dialog box (Project menu, Settings command).

Example

The following example removes the exception handling flag used by the Visual C++ compiler from the project makefile owned by a specified project and configuration:

Sub RemoveExceptionHandling
If Projects(1).Type = "Build" Then
   Projects(1).Configurations(1).RemoveToolSettings "cl.exe", "/GX"
End If
End Sub

See Also   AddToolSettings method.