Rename the directory where project is located

olgage

New member
Joined
Nov 14, 2006
Messages
4
Programming Experience
Beginner
I need to rename the directory where project is located.
I didn't find the way to change it from IDE.
If I change it from Explorer and close+open the VS2005 -> the project can not be opened (of cause!) because all pathes still reference to the old [renamed] directory.

What can I do?
 
Granted the reference on the start page won't work, but can you not do a File/Open Project... and navigate to the new location?

I've done the same myself, and whilst it does give you two entries on the Start page, one of those entries should work correctly.

Cheers, Menthos
 
Do you mean the folder containing the solution or a project? If you actually mean the solution then just change the name and double-click the SLN file to open it in VS. If you do mean the project folder then you normally wouldn't bother. You can change the name of the project itself in VS and that's all that should matter. The only time it would be an issue that the folder had a different name to the project itself would be if you then wanted to add another project with the same name as that folder. If you really must change the name of a project folder then simply open the SLN file in Notepad and edit the project path. The SLN file is simply plain text in a specific format.
 
So there is no way to actually change the project folder name? If you really wanted it changed, would you have to create a new project and manually add all of the files from the old folder?

Dave
 
So there is no way to actually change the project folder name? If you really wanted it changed, would you have to create a new project and manually add all of the files from the old folder?

Dave
A folder is a folder. You can change the name of any folder in Windows Explorer. You'd just then have to manually go through your solution and update any references to the old folder name. The only one I'm specifically aware of would be in the SLN file, which is just plain text. There may be others though. Assuming that you knew where all the changes were that you needed to make you could create your own tool to automate the task. You could even integrate it into VS if you wanted to. Everything's got to be coded by someone.
 
Who knew - another thing that is extremely easy in vb haha. I changed this line in the sln file
VB.NET:
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "NewProjectName", "NewFolder\NetProjectName.vbproj", "{76A2D4C8-B0C4-4613-AFB3-5B204B0E633C}"

and all is well.

Dave
 
Back
Top