none
Rename project RRS feed

  • Question

  • hi

    i have a solution with many project

    I have changed the name project to organize forms and classes in a n-tier application

    everything is ok but in the disk I still have old names for projects 

    Haw is it possibile to change the names also on the disk and not only in the solution ?

    Saturday, December 30, 2017 1:50 PM

Answers

  • To add another method, I use it when my notepad method fails. 

    Copy all your projects to a new folder with a new folder structure. 

    Now Create a new Project in the top of that structure, this creates a new solution.

    Change in VS with Solution Explorer the solution name. 

    Then Add with File _> add _> existing Projects the projects. 

    Remove the first created project and set your startup project

    This gives the cleanest solution in Solution Explorer.


    Success Cor



    • Edited by Cor Ligthert Saturday, December 30, 2017 3:34 PM
    • Marked as answer by Claudio111 Saturday, December 30, 2017 4:16 PM
    Saturday, December 30, 2017 3:31 PM
  • done  thanks
    • Marked as answer by Claudio111 Saturday, December 30, 2017 4:16 PM
    Saturday, December 30, 2017 4:16 PM

All replies

  • if you have not used a storage solution. 

    Then use File Explorer.

    Copy the folder with the SLN file. 

    Now you can edit with notepad the .sln file (and if needed the .vbproj files)


    Success Cor

    Saturday, December 30, 2017 2:06 PM
  • The project name should have changed and the project file itself name should have changed on the HD, if done through VS's Solution Explorer. But that doesn't mean that the folder the project file is in the folder name itself is going to change.

    Saturday, December 30, 2017 2:47 PM
  • How about

    1. Ensure all is working in the solution
    2. Make a backup. In Windows Explorer, select the solution folder, right click, select copy, then paste which will create a backup of the entire solution.
    3. Name each project
    4. Create a new folder for each project one at a time with a suitable name.
    5. Copy from windows explorer the renamed project to the new folder with the suitable name.
    6. Remove the current project from the solution.
    7. Add the renamed (in the new folder) to the solution
    8. Delete the old project folder, repeat the above for each project.
    9. Build the solution to ensure it still works, if not open the backup, build, it should work if you followed along. Since it works you can delete the other one and rename the copy to the original folder name just removed via windows explorer.

    So from that, there is no other way to do this as there are no options in VS to rename the project folders. Well of course you could get bold and close the solution, edit the rename the folders, edit the solution file (very risky) and then re-open the solution and hope you got the edits right.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Saturday, December 30, 2017 3:20 PM
    Moderator
  • To add another method, I use it when my notepad method fails. 

    Copy all your projects to a new folder with a new folder structure. 

    Now Create a new Project in the top of that structure, this creates a new solution.

    Change in VS with Solution Explorer the solution name. 

    Then Add with File _> add _> existing Projects the projects. 

    Remove the first created project and set your startup project

    This gives the cleanest solution in Solution Explorer.


    Success Cor



    • Edited by Cor Ligthert Saturday, December 30, 2017 3:34 PM
    • Marked as answer by Claudio111 Saturday, December 30, 2017 4:16 PM
    Saturday, December 30, 2017 3:31 PM
  • done  thanks
    • Marked as answer by Claudio111 Saturday, December 30, 2017 4:16 PM
    Saturday, December 30, 2017 4:16 PM