IVsSolutionLoadEvents.OnBeforeLoadProjectBatch Method (Boolean)

 

Fired when loading a batch of dependent projects as part of loading a solution in the background.

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

int OnBeforeLoadProjectBatch(
	bool fIsBackgroundIdleBatch
)

Parameters

fIsBackgroundIdleBatch
Type: System.Boolean

true if the batch is loaded in the background, otherwise false.

Return Value

Type: System.Int32

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

Some batches may be loaded synchronously to satisfy user demand load requests; other batches are loaded in the background at idle time. Clients may request that background batch project loading be delayed if they have higher-priority idle time tasks. The M:Microsoft.VisualStudio.Shell.Interop.IVsSolutionLoadEvents.OnQueryBackgroundLoadProjectBatch event is fired only for background batches.

Examples of user demand load requests (that is, synchronous, not background batches) include:

  • The projects required to open the documents in the .suo open document list are loaded synchronously during the initial solution open operation.

  • When the user expands a "(pending)" project in the Solution Explorer, that project and all of its dependencies are opened synchronously.

  • Before building the solution, the Startup project(s) and all build dependencies are loaded.

Clients should defer expensive operations normally done during OnAfterOpenProject until they receive M:Microsoft.VisualStudio.Shell.Interop.IVsSolutionLoadEvents.OnAfterLoadProjectBatch.

Return to top
Show: