Compartilhar via


IVsSolutionLoadManagerSupport.SetProjectLoadPriority(Guid, UInt32) Method

Definition

Obsolete. This API became obsolete to optimize solution load performance.

public:
 int SetProjectLoadPriority(Guid % refguidProject, System::UInt32 loadState);
public int SetProjectLoadPriority (ref Guid refguidProject, uint loadState);
abstract member SetProjectLoadPriority : Guid * uint32 -> int
Public Function SetProjectLoadPriority (ByRef refguidProject As Guid, loadState As UInteger) As Integer

Parameters

refguidProject
Guid

The GUID of the project

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

There are four states for an unloaded project

  • PLP_DemandLoad: force the immediate load of the project during the Open Solution operation. If this value is set after the solution is opened, then this will force the load of the project on the very next idle point (or synchronously if IVsSolution4::EnsureXXXLoaded is also called).

  • PLP_BackgroundLoad: load in the background on idle.

  • PLP_LoadIfNeeded: load only if needed as a dependency of another loaded project, or if the user expands the project in the Solution Explorer.

  • PLP_ExplicitLoadOnly: keep unloaded even if needed as a dependency of another project. Explicit load only projects behave the same as projects unloaded by the user.

This project load priority setting is persisted during solution close in the .suo file (per-user, per-solution) and will be used as the load priority for the project on the next solution open, unless the Solution Load Manager overrides the persisted value by calling this method in OnBeforeOpenProject.

Applies to