Configuration
This documentation is archived and is not being maintained.

Configuration Object

Visual Studio .NET 2003

Represents a project or project item's build configuration dependent properties.

Configurations

   Configuration

[Visual Basic .NET]
Public Interface Configuration
    Inherits IDispatch
[Visual Basic 6]
Class Configuration
[C++]
interface Configuration : IDispatch
[C#]
public interface Configuration : IDispatch
[JScript .NET]
public interface Configuration extends IDispatch

Remarks

Project(Item).Properties has configuration-independent properties.

Each Configuration object represents the properties for a project configuration and platform name pair, such as ("Debug", "Win32") or ("Release", "Win32"). For most projects the platform is either non-existent, "Win32," or "WSP."

Requirements

Namespace: EnvDTE

File: dte.olb

Example

This example shows how to set a project configuration property using the ConfigurationManager object.

Sub ConfigurationExample()
   ' Before running, create a new Visual C++ project (any type).
   Dim Proj As Project = DTE.VCProjects.Item(1)
   Dim msg As String
   msg = "Project name: " & Proj.Name & vbCr
   msg = msg & "Project property name: " & Proj.ConfigurationManager. _
     Item(1).Properties.Item(1).Name & vbCr
   msg = msg & "Project property value: " & Proj.ConfigurationManager. _
     Item(1).Properties.Item(1).Value & vbCr
   MsgBox(msg)
   msg = ""
   Proj.ConfigurationManager.Item(1).Properties.Item(1).Value = False
   msg = "Project name: " & Proj.Name & vbCr
   msg = msg & "Project property name: " & Proj.ConfigurationManager. _
     Item(1).Properties.Item(1).Name & vbCr
   msg = msg & "Project property value: " & Proj.ConfigurationManager. _
     Item(1).Properties.Item(1).Value & vbCr
   MsgBox(msg)
End Sub

See Also

Properties, Methods, and Events | Configurations Collection

Show:
© 2016 Microsoft