visual-studiodirectoryprojects-and-solutions

How can I rename a project folder from within Visual Studio?


My current solution for renaming the project folder is:

Is there a better way?


Solution

  • TFS users: If you are using source control that requires you to warn it before your rename files/folders then look at this answer instead which covers the extra steps required.


    To rename a project's folder, file (.*proj) and display name in Visual Studio:

    Note: Other suggested solutions that involve removing and then re-adding the project to the solution will break project references.

    If you perform these steps then you might also consider renaming the following to match:

    1. Assembly
    2. Default/Root Namespace
    3. Namespace of existing files (use the refactor tools in Visual Studio or ReSharper's inconsistent namespaces tool)

    Also consider modifying the values of the following assembly attributes:

    1. AssemblyProductAttribute
    2. AssemblyDescriptionAttribute
    3. AssemblyTitleAttribute