Export (0) Print
Expand All

IVsSccProject2.SetSccLocation Method

This method is called by the source control portion of the environment when a project is initially added to source control, or to change some of the project's settings.

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

int SetSccLocation (
	[InAttribute] string pszSccProjectName,
	[InAttribute] string pszSccAuxPath,
	[InAttribute] string pszSccLocalPath,
	[InAttribute] string pszSccProvider
)
int SetSccLocation (
	/** @attribute InAttribute() */ String pszSccProjectName, 
	/** @attribute InAttribute() */ String pszSccAuxPath, 
	/** @attribute InAttribute() */ String pszSccLocalPath, 
	/** @attribute InAttribute() */ String pszSccProvider
)
function SetSccLocation (
	pszSccProjectName : String, 
	pszSccAuxPath : String, 
	pszSccLocalPath : String, 
	pszSccProvider : String
) : int

Parameters

pszSccProjectName

[in] String, opaque to the project, that identifies the project location on the server. Persist this string in the project file.

pszSccAuxPath

[in] String, opaque to the project, that identifies the path to the server. Persist this string in the project file.

pszSccLocalPath

[in] String, opaque to the project, that identifies the local path to the project. Persist this string in the project file.

pszSccProvider

[in] String, opaque to the project, that identifies the source control package. Persist this string in the project file.

Return Value

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

COM Signature

From ivssccproject2.idl

HRESULT SetSccLocation(
   [in] LPCOLESTR pszSccProjectName,
   [in] LPCOLESTR pszSccAuxPath,
   [in] LPCOLESTR pszSccLocalPath,
   [in] LPCOLESTR pszSccProvider
);

IVsSccProject2::SetSccLocation is called by the environment to inform the project of its source control settings. This information is used to identify the source control package for the project, and map between the source control server and disk location of the project and related tasks.

The project must remember the four pieces of data (project name, auxiliary path, local path, and source control package) that are specified by persisting them in its project file. When these strings are passed to the project, the project must call QueryEditFiles to determine whether it can change its state, and accept the strings and store them.

When it is opened, the project calls RegisterSccProject to register itself with the source control portion of the environment.

NoteNote

If a null reference (Nothing in Visual Basic) orempty strings are returned for all four parameters, the project does not need to store source control settings and should not call RegisterSccProject.

Community Additions

ADD
Show:
© 2014 Microsoft