Export (0) Print
Expand All
Expand Minimize

FileConfigurations Property

Visual Studio .NET 2003

The list of configurations on the selected file.

[Visual Basic .NET]
Public ReadOnly Property FileConfigurations() As Object
[Visual Basic 6]
Property Get FileConfigurations() As Object
[C++]
HRESULT __stdcall get_FileConfigurations(
   /* [out, retval] */ IDispatch** retVal
);
[C#]
public object FileConfigurations {get;}
[JScript .NET]
public function get FileConfigurations() : Object

Remarks

The configurations on the file correspond to the configurations on the project.

Example

The following sample code uses the FileConfigurations property in the development environment:

' add reference to Microsoft.VisualStudio.VCProjectEngine
Imports EnvDTE
Imports Microsoft.VisualStudio.VCProjectEngine

Public Module Module1
    Sub Test()
        Dim idx, idx2 As Integer
        Dim mycollection As IVCCollection
        Dim file As VCFile
        Dim prj As VCProject
        prj = DTE.Solution.Projects.Item(1).Object
        mycollection = prj.Files
        MsgBox(mycollection.Count)
        For idx = 1 To mycollection.Count
            file = mycollection.Item(idx)
            For idx2 = 1 To file.FileConfigurations.Count
                MsgBox(file.FileConfigurations.Item(idx2).Name())
            Next
        Next
    End Sub
End Module

See Samples for Project Model Extensibility for information on how to compile and run this sample.

See Also

Applies To: VCFile Object

Show:
© 2015 Microsoft