Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

_DTE.ActiveSolutionProjects Property

Gets an array of currently selected projects.

Namespace:  EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)
Object ActiveSolutionProjects { get; }

Property Value

Type: System.Object
An array of currently selected projects.
Sub ActiveSolutionProjectsExample()
  ' Returns the name of the currently selected project in the solution.
  Dim projs As System.Array
  Dim proj As Project
  projs = DTE.ActiveSolutionProjects()
  If projs.Length > 0 Then
    proj = CType(projs.GetValue(0), EnvDTE.Project)
      MsgBox(proj.UniqueName)
    Else
      MsgBox(projs.Length)
  End If
End Sub
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.