Projects Interface

Represents all of the projects of a given kind.

Namespace:  EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)


<GuidAttribute("E3EC0ADD-31B3-461F-8303-8A5E6931257A")> _
Public Interface Projects _
    Inherits IEnumerable
public interface Projects : IEnumerable
public interface class Projects : IEnumerable
type Projects =  
        interface IEnumerable
public interface Projects extends IEnumerable

The Projects type exposes the following members.


  Name Description
Public property Count Gets a value indicating the number of objects in the Projects collection.
Public property DTE Gets the top-level extensibility object.
Public property Kind Gets a GUID String indicating the kind or type of the object.
Public property Parent Gets the immediate parent object of a Projects collection.
Public property Properties Gets a collection of all properties that pertain to the Projects collection.



  Name Description
Public method GetEnumerator Gets an enumerator for items in the collection.
Public method Item Returns an indexed member of a Projects collection.



The Projects collection represents all projects of the same kind in the current instance of the integrated development environment (IDE). Typically, this collection is late-bound to the DTE object.


Sub ProjectsExample()
    ' Before running, be sure you have one or more projects
    ' loaded in the solution.
    Dim prj As Project
    Dim prjs As Projects
    Dim msg As String

    ' Go through all of the projects in the solution and display
    ' their names and types.
    prjs = DTE.Solution.Projects
    For Each prj In prjs
        msg += "NAME: " & prj.Name & "TYPE: " & prj.Kind & vbCr
End Sub

See Also


EnvDTE Namespace

Other Resources

Controlling Projects and Solutions