This documentation is archived and is not being maintained.

IVsSolution.OnAfterRenameProject Method

Completes the renaming of a project.

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

int OnAfterRenameProject(
	IVsProject pProject,
	string pszMkOldName,
	string pszMkNewName,
	uint dwReserved


Type: Microsoft.VisualStudio.Shell.Interop.IVsProject
[in] IVsProject pointer for the project to rename.
Type: System.String
[in] Old name of the project on disk.
Type: System.String
[in] New name of the project on disk.
Type: System.UInt32
[in] Reserved for future use.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

COM Signature

From vsshell.idl:

HRESULT IVsSolution::OnAfterRenameProject(
   [in] IVsProject *pProject,
   [in] LPCOLESTR pszMkOldName,
   [in] LPCOLESTR pszMkNewName,
   [in] DWORD dwReserved

This method completes the renaming of a project. If the project is stored in the file system, the caller is required to rename the file in the file system prior to calling this method (for example, by calling the MoveFile method in the Platform SDK). This method handles updating the running document table and notifying IVsTrackProjectDocuments2 so that clients (for example, source control) can know that the project file has been renamed.