<t>Manually edit .sln file<br/>
<br/>
This method is entirely aimed at renaming the directory for the project, as viewed in Windows Explorer.<br/>
<br/>
This method does not suffer from the problems in the Remove/add project file method below (references disappearing), but it can result in problems if your project is under source control (see notes below). This is why step 2 (backup) is so important.<br/>
<br/>
- Close Visual Studio.<br/>
<br/>
- Create a backup of your .sln file (you can always roll back).<br/>
<br/>
- Imagine you want to rename directory
Project1 to Project2.<br/>
<br/>
- If not using source control, rename the folder from
Project1 to Project2 using Windows Explorer.<br/>
<br/>
- If using source control, rename the folder from
Project1 to Project2 using the functions supplied by source control. This preserves the history of the file. For example, with TortoiseSVN, right click on the file, select TortoiseSVN .. Rename.<br/>
<br/>
- In the .sln file, edit all instances of
Project1 to be Project2, using a text editor like NotePad.<br/>
<br/>
- Restart Visual Studio, and everything will work as before, but with the project in a different directory.<br/>
<br/>
You can also see renaming solution manually or post which describes this manual process.<br/>
<br/>
Advantages<br/>
<br/>
- You can make the directory within Windows Explorer match the project name within the solution.<br/>
<br/>
- This method does not remove any references from other projects to this file (an advantage over the Remove/add project file method, see my other answer below).<br/>
<br/>
Warnings<br/>
<br/>
- It's important to back everything up into a .zip file before renaming anything, as this method can create issues with source control.<br/>
<br/>
- If your project is under source control, it may create issues if you rename files o<br/>
<br/>
(Réponse tronquée)</t>