I have a rather involved Visual Studio solution (2010, but it shouldn't matter) that I need to rename.
I want to rename the folders to match the new solution name, but I can't figure out a way to refactor the folder names automatically, and going through every single project file will be painful.
Is there an official way to do this? Alternatively (and much less preferably), are there free tools to accomplish this?
To rename a website:
http://www.c-sharpcorner.com/Blogs/46334/rename-website-project-in-visual-studio-2013.aspx
locate and edit IISExpress's applicationhost.config, found here: C:\Users{username}\Documents\IISExpress\config
Delete your bin and obj subfolders to remove a load of incorrect reference then use windows to search for old name.
Edit any code or xml files found and rebuild, should be ok now.
Below is a step-by-step way of renaming your entire solution in Visual Studio 2013
Assuming we're changing a project named "HelloWorld.ui" to "Section1to5.ui"
Right click on the Project that you have just renamed, and click on "Properties". Under the Application tab, change the "Assembly name" and "Default namespace".
In the main Program.cs file (or any other code files that you may have created), rename the namespace declaration to use the new name. For this right-click the namespace and select Refactor > Rename enter a new name. For example:
namespace HelloWorld.ui ----> namespace Section1to5.ui
Next, expand the "Properties" and double click on AssemblyInfo.cs file. You will notice the below code fragment:
You need to change the AssemblyTitle and AssemblyProduct in Properties/AssemblyInfo.cs to the new name, in this example from "HelloWorld.ui" to "Section1to5.ui". Once you're done changing the name, save and close Visual Studio.
In the project directory, go inside the folder "HelloWorld.ui" and delete the "bin" and "obj" directories.
Once you're done, rename the folder "HelloWorld.ui" to the new project name.
Open the renamed solutions file with a text editor such as Notepad or Notepad++ and edit the following line:
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelloWorld.ui", "HelloWorld.ui\HelloWorld.ui.csproj", "{39FC65A3-3AE7-4EC9-B8F7-74F971636C70}"
Replace all the instances of "HelloWorld.ui" the new name that you've selected for your project, in this case "Section1to5.ui". This changes the path of the project to the renamed directory in step 6.
Open the solutions file with visual studio, and clean and rebuild the project.
You may notice that the "Debug/Run" button has been replaced by the "Attach" button. If this happens, simply right click on the project and choose the "Set as StartUp project" option. Alternatively, click on Tools>Customize>Commands>Add command>Debug and add the button.
You're done renaming the project, if you have any doubts feel free to post and I'd be glad to help out!
I'm new to VS. I just had that same problem: Needed to rename an started project after a couple weeks work. This what I did and it worked.
Explorer and in the 1st tab change the default startup form to the form it should be.
Maybe more steps but less or no typing at all, just some mouse clicks. Hope it helps :)
along with answer of this link
https://stackoverflow.com/a/19844531/6767365
rename these files. I renamed my project to MvcMovie and it works fine
You can:
click file-> new ->create project from existing project
select your original file, eg. solution 1 and input the new file name solution 2
change the project name in the new solution 2