IVsSolution5::ResolveFaultedProjects Method (UInt32, array<IVsHierarchy^>^, IVsPropertyBag^, UInt32, UInt32)
Resolves faulted projects.
Assembly: Microsoft.VisualStudio.Shell.Interop.11.0 (in Microsoft.VisualStudio.Shell.Interop.11.0.dll)
void ResolveFaultedProjects( unsigned int cHierarchies, array<IVsHierarchy^>^ rgHierarchies, IVsPropertyBag^ pProjectFaultResolutionContext, [OutAttribute] unsigned int% pcResolved, [OutAttribute] unsigned int% pcFailed )
Parameters
- cHierarchies
-
Type:
System::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.
- rgHierarchies
-
Type:
array<Microsoft.VisualStudio.Shell.Interop::IVsHierarchy^>^
[in, size_is(cHierarchies)] Array of project hierarchies that are to be 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:
System::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:
System::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.
The fault resolution process is as follows. For each project hierarchy in rgHierarchies:
Query VSHPROPID_IsFaulted. If it is false, then skip this project.
Check whether the hierarchy supports IVsProjectFaultResolver.
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.
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.