VsShellUtilities.GetHierarchy(IServiceProvider, Guid) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the hierarchy node that is specified by the project GUID.
public:
static Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ GetHierarchy(IServiceProvider ^ site, Guid projectGuid);
public static Microsoft.VisualStudio.Shell.Interop.IVsHierarchy GetHierarchy (IServiceProvider site, Guid projectGuid);
static member GetHierarchy : IServiceProvider * Guid -> Microsoft.VisualStudio.Shell.Interop.IVsHierarchy
Public Shared Function GetHierarchy (site As IServiceProvider, projectGuid As Guid) As IVsHierarchy
Public Function GetHierarchy (site As IServiceProvider, projectGuid As Guid) As IVsHierarchy
Parameters
- site
- IServiceProvider
The service provider.
- projectGuid
- Guid
A project guid.
Returns
A reference to an IVsHierarchy interface.
Remarks
If the project is not open, this method will catch and trace an InvalidCastException.