My current solution for renaming the project folder is:
- Remove the project from the solution.
- Rename the folder outside Visual Studio.
- Re-add the project to the solution.
Is there any better way?
My current solution for renaming the project folder is:
Is there any better way?
There's a simpler approach which was tested in VS 2013 Update 1 and applicable for TFS-connected projects:
The simplest way is to go to the property of the window change name of default namespaces then the rename is done
There is another way doing this, using the *.sol, *csproj files.
it will be like this (relative to the *.sol file):
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shani.Commands.Impl", "Shani.Commands.Impl\Shani.Commands.Impl.csproj", "{747CFA4B-FC83-419A-858E-5E2DE2B948EE}"
and just change the first part to the new diretory for example:
Impl\Shani.Commands.Impl\Shani.Commands.Impl.csproj
of course don't forget to move the whole project to that directory
Have fun.
@andersjanmyr's Solution: you may press Alt+Enter to bring up the Properties Page for the unavailable project and set the "File Path" property there; since it is not available in the right-click_context-menu of the unavailable project (in VS2008).
For VS2017 you can use my visual studio extension
download
It will rename project in:
Rename project in solution and the project folder
Delete project from solution
Add existing project to solution(your renamed project)
It works for me. TFS will also track new project.