Export (0) Print
Expand All
Expand Minimize

Projects Property (VCProjectEngine)

Visual Studio .NET 2003

Returns the Visual C++ projects in the solution.

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

Example

The following sample code modifies the Projects property in the development environment:

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

Public Module Module1
    Sub Test()
        Dim prj As VCProject
        Dim projects As IVCCollection
        Dim ProjEng As VCProjectEngine
        Dim idx As Integer
        prj = DTE.Solution.Projects.Item(1).Object
        ProjEng = prj.VCProjectEngine
        projects = ProjEng.Projects
        For idx = 1 To projects.Count
            MsgBox(projects.Item(idx).Name)
        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: VCProjectEngine Object

Show:
© 2014 Microsoft