I suggest you ...

rename project folders and files

Create a way to rename a project folder. This is closely related to http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/2517011-enable-project-renaming- and http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/3054944-rename-the-project-folder-when-renaming-a-project

I would like a way where I can change a folder name and optionally filenames: Project -> right click -> rename folder and files... -> give a new name, select folder, output filename or both ->
* Visual Studio updates name of the the solutiondirectory
* Visual Studio updates the solution to point at the new directory
* Visual Studio updates references of other projects to this project to the new directory
* Visual Studio updates the project to reflect the new output file name
* Visual Studio cleans the old files from the output dir if present

Extra brownie points for optionally integrating this in the rename project functionality (update output file name and directory to NEWNAME? <yes> <no>)

Double extra brownie points for a 'search for references to this directory from other tools': text-based search for all files not in obj or bin dirs in all folders under the solution dir that contain the old filename, and ask if the old directory name should be replaced with the new one, or if you want to open the files and edit them manually.

4,982 votes
Sign in
Password icon
Signed in as (Sign out)
You have left! (?) (thinking…)
Martijn Hoekstra shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →


Sign in
Password icon
Signed in as (Sign out)
  • Peter Toye commented  ·   ·  Flag as inappropriate

    I can't agree with Sean. It may be "easy" to edit the various files. But as far as I can see it's not documented, and can well change with future releases. Peter's comment implies as much.

    It's up to MS to produce a watertight solution, not users to produce solutions which work in their case, but don't for others. IMHO it's ridiculous that MS didn't see this when first designing VS; by now it's probably too late as the product has become too complicated.

  • Peter commented  ·   ·  Flag as inappropriate

    It would be nice to do it in the UI but I agree with Sean below, it's pretty easy to just edit the .sln file (or it has been when I've needed to do it - perhaps its more complicated in other scenarios)

  • Sean commented  ·   ·  Flag as inappropriate

    You can change the project and folder name just fine. You just need to open the .csproj and .sln s' references to the name you used to use by opening them up in a text editor and changing them. There might be more files, can't fully remember, but I do recall changing folder and project names as far back as 2010 by editing these files as text documents.

  • Abdel-Hakeem Badran commented  ·   ·  Flag as inappropriate

    How is this not a thing yet? Please, please, please get on this. Very annoying to have to build project dependencies over and over and over, I want to re-name templates that I create.

  • Sourav Dash commented  ·   ·  Flag as inappropriate

    Seriously, this is the most needed idea... Me too want this.. I have lots of projects that I named "Whatever" at the start but now they have some specific meanings so I want to rename them to "Something Meaningful" but going through this lots of steps for each project is kind of "Impossible" for me. Microsoft should have analysed those problems till now. I don't know why the **** they still don't have this feature.

  • Andrew Perkin commented  ·   ·  Flag as inappropriate

    This is one of those fundamentally stupid things that Microsoft does that you look at and think - 'Seriously, it wont do that !!!' (I'm from the Dynamics world, I'm used to it) and now everyone is aware it wont do that , why isn't it tweaked for the next release.

    Microsoft, surely the space/time continuum will not break if you change this......

  • Hameem commented  ·   ·  Flag as inappropriate

    This needs to be a feature. It seems like a very basic thing to do manually in such an advanced IDE.

  • Peter Toye commented  ·   ·  Flag as inappropriate

    It's about time. I think VS must be the only application that doesn't have a Save As... feature.

Feedback and Knowledge Base