Export (0) Print
Expand All

IVsSolution.SaveSolutionElement Method

Programmatically saves a document, a project, or the entire solution.

Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in microsoft.visualstudio.shell.interop.dll)

int SaveSolutionElement (
	[InAttribute] uint grfSaveOpts,
	[InAttribute] IVsHierarchy pHier,
	[InAttribute] uint docCookie
)
int SaveSolutionElement (
	/** @attribute InAttribute() */ UInt32 grfSaveOpts, 
	/** @attribute InAttribute() */ IVsHierarchy pHier, 
	/** @attribute InAttribute() */ UInt32 docCookie
)
function SaveSolutionElement (
	grfSaveOpts : uint, 
	pHier : IVsHierarchy, 
	docCookie : uint
) : int

Parameters

grfSaveOpts

[in] Save Options. For a list of grfSaveOpts, see __VSSLNSAVEOPTIONS.

pHier

[in] Pointer to the IVsHierarchy interface of the document to save.

docCookie

[in] Abstract handle to the element that was saved.

Return Value

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

COM Signature

From vsshell.idl:

HRESULT IVsSolution::SaveSolutionElement(
   [in] VSSLNSAVEOPTIONS grfSaveOpts,
   [in] IVsHierarchy *pHier,
   [in] VSCOOKIE docCookie
);

To save the entire solution, call SaveSolutionElement(grfSaveOpts, a null reference (Nothing in Visual Basic), a null reference (Nothing in Visual Basic)). To save a single project, call SaveSolutionElement(grfSaveOpts, phier, a null reference (Nothing in Visual Basic)). To save a single document, call SaveSolutionElement(grfSaveOpts, a null reference (Nothing in Visual Basic), docCookie).

Community Additions

ADD
Show:
© 2014 Microsoft