Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

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 : IEnumerable
/** @attribute GuidAttribute("E3EC0ADD-31B3-461F-8303-8A5E6931257A") */ 
public interface Projects extends IEnumerable
GuidAttribute("E3EC0ADD-31B3-461F-8303-8A5E6931257A") 
public interface Projects extends IEnumerable

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
    Next
    MsgBox(msg)
End Sub

Community Additions

ADD
Show:
© 2015 Microsoft