Partager via


VsShellUtilities.GetCfgProvider Method

Gets the configuration provider object for a given project.

Namespace:  Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.12.0 (in Microsoft.VisualStudio.Shell.12.0.dll)

Syntax

'Declaration
Public Shared Function GetCfgProvider ( _
    hierarchy As IVsHierarchy _
) As IVsCfgProvider
public static IVsCfgProvider GetCfgProvider(
    IVsHierarchy hierarchy
)
public:
static IVsCfgProvider^ GetCfgProvider(
    IVsHierarchy^ hierarchy
)
static member GetCfgProvider : 
        hierarchy:IVsHierarchy -> IVsCfgProvider
public static function GetCfgProvider(
    hierarchy : IVsHierarchy
) : IVsCfgProvider

Parameters

Return Value

Type: Microsoft.VisualStudio.Shell.Interop.IVsCfgProvider
The configuration provider.

Remarks

This method uses the established (by build manager) algorithm for accessing the configuration provider:

  1. If the project provides a browse object, QI from the browse object.

  2. Otherwise, if the project implements IVsGetCfgProvider, use GetCfgProvider

  3. Otherwise, QI for IVsCfgProvider

.NET Framework Security

See Also

Reference

VsShellUtilities Class

Microsoft.VisualStudio.Shell Namespace