Share via


IVsSolution5.ResolveFaultedProjects Method

Resolves faulted projects.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop.11.0 (in Microsoft.VisualStudio.Shell.Interop.11.0.dll)

Syntax

'Declaration
Sub ResolveFaultedProjects ( _
    cHierarchies As UInteger, _
    rgHierarchies As IVsHierarchy(), _
    pProjectFaultResolutionContext As IVsPropertyBag, _
    <OutAttribute> ByRef pcResolved As UInteger, _
    <OutAttribute> ByRef pcFailed As UInteger _
)
void ResolveFaultedProjects(
    uint cHierarchies,
    IVsHierarchy[] rgHierarchies,
    IVsPropertyBag pProjectFaultResolutionContext,
    out uint pcResolved,
    out uint pcFailed
)
void ResolveFaultedProjects(
    [InAttribute] unsigned int cHierarchies, 
    [InAttribute] array<IVsHierarchy^>^ rgHierarchies, 
    [InAttribute] IVsPropertyBag^ pProjectFaultResolutionContext, 
    [OutAttribute] unsigned int% pcResolved, 
    [OutAttribute] unsigned int% pcFailed
)
abstract ResolveFaultedProjects : 
        cHierarchies:uint32 * 
        rgHierarchies:IVsHierarchy[] * 
        pProjectFaultResolutionContext:IVsPropertyBag * 
        pcResolved:uint32 byref * 
        pcFailed:uint32 byref -> unit
function ResolveFaultedProjects(
    cHierarchies : uint, 
    rgHierarchies : IVsHierarchy[], 
    pProjectFaultResolutionContext : IVsPropertyBag, 
    pcResolved : uint, 
    pcFailed : uint
)

Parameters

  • cHierarchies
    Type: UInt32

    [in] The number of project hierarchies that are to be resolved. If this parameter is empty (cHierarchies == 0), all faulted projects in the solution are resolved.

  • pProjectFaultResolutionContext
    Type: Microsoft.VisualStudio.Shell.Interop.IVsPropertyBag

    [in, unique] Property bag to be used as a fault resolution context. If this parameter is provided, VSPROPID_ProjectFaultResolutionContext references this property bag for the duration of the call. The caller can use this property bag to pass initial values for specific properties instead of the default values. If null is passed in this parameter, a new blank property bag will be used as the context.

  • pcResolved
    Type: UInt32%

    [out] The number of projects for which resolution was attempted (that is, that ResolveFault called and/or the project reloaded). This might be less than cHierarchies if some of the projects in rgHierarchies are not faulted, or if one of the projects failed to resolve with OLE_E_PROMPTSAVECANCELLED.

  • pcFailed
    Type: UInt32%

    [out] The number of projects that remain in the faulted state after an attempted resolution. This parameter does not count projects for which resolution was not attempted, for example those following the project that failed to resolve with OLE_E_PROMPTSAVECANCELLED.

Remarks

The fault resolution process is as follows. For each project hierarchy in rgHierarchies:

  1. Query VSHPROPID_IsFaulted. If it is false, then skip this project.

  2. Check whether the hierarchy supports IVsProjectFaultResolver.

  3. If IVsProjectFaultResolver is supported, call ResolveFault on the hierarchy. If it fails with OLE_E_PROMPTSAVECANCELLED, then stop processing projects and return OLE_E_PROMPTSAVECANCELLED.

  4. If IVsProjectFaultResolver is not supported, or if ResolveFault set *pfShouldReload to true, reload the hierarchy. If it fails with OLE_E_PROMPTSAVECANCELLED, then stop processing projects and return OLE_E_PROMPTSAVECANCELLED.

.NET Framework Security

See Also

Reference

IVsSolution5 Interface

Microsoft.VisualStudio.Shell.Interop Namespace