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)


Function OnAfterRenameProject ( _
    pProject As IVsProject, _
    pszMkOldName As String, _
    pszMkNewName As String, _
    dwReserved As UInteger _
) As Integer
Dim instance As IVsSolution 
Dim pProject As IVsProject 
Dim pszMkOldName As String 
Dim pszMkNewName As String 
Dim dwReserved As UInteger 
Dim returnValue As Integer 

returnValue = instance.OnAfterRenameProject(pProject, _
    pszMkOldName, pszMkNewName, dwReserved)
int OnAfterRenameProject(
    IVsProject pProject,
    string pszMkOldName,
    string pszMkNewName,
    uint dwReserved
int OnAfterRenameProject(
    [InAttribute] IVsProject^ pProject, 
    [InAttribute] String^ pszMkOldName, 
    [InAttribute] String^ pszMkNewName, 
    [InAttribute] unsigned int dwReserved
function OnAfterRenameProject(
    pProject : IVsProject, 
    pszMkOldName : String, 
    pszMkNewName : String, 
    dwReserved : uint
) : int


  • pszMkOldName
    Type: System.String

    [in] Old name of the project on disk.

  • pszMkNewName
    Type: System.String

    [in] New name of the project on disk.

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.

.NET Framework Security

See Also


IVsSolution Interface

IVsSolution Members

Microsoft.VisualStudio.Shell.Interop Namespace