This documentation is archived and is not being maintained.

IVsPersistSolutionProps.OnProjectLoadFailure Method

Allows cleanup and memory management in cases where project fails to load.

Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in

int OnProjectLoadFailure (
	[InAttribute] IVsHierarchy pStubHierarchy,
	[InAttribute] string pszProjectName,
	[InAttribute] string pszProjectMk,
	[InAttribute] string pszKey
int OnProjectLoadFailure (
	/** @attribute InAttribute() */ IVsHierarchy pStubHierarchy, 
	/** @attribute InAttribute() */ String pszProjectName, 
	/** @attribute InAttribute() */ String pszProjectMk, 
	/** @attribute InAttribute() */ String pszKey
function OnProjectLoadFailure (
	pStubHierarchy : IVsHierarchy, 
	pszProjectName : String, 
	pszProjectMk : String, 
	pszKey : String
) : int



[in] Pointer to the IVsHierarchy interface of the stub project. To be used in place of the project that failed to load.


[in] Project name as it appears in the solution file (.sln). a null reference (Nothing in Visual Basic) for global section.


[in] Full path for project file. a null reference (Nothing in Visual Basic) for global section.


[in] Name of the section.

Return Value

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

COM Signature

From vsshell.idl:

HRESULT IVsPersistSolutionProps::OnProjectLoadFailure(
   [in] IVsHierarchy *pStubHierarchy,
   [in] LPCOLESTR pszProjectName,
   [in] LPCOLESTR pszProjectMk,
   [in] LPCOLESTR pszKey

VSPackages which pre-load Project pszKeys data may need to respond when the associated project fails to load.