How to rename a Project Folder from within Visual Studio? -
my current solution renaming project folder is:
- remove project solution.
- rename folder outside visual studio.
- re-add project solution.
is there better way?
tfs users: if using source control requires warn before rename files/folders @ this answer instead covers steps required.
to rename project's folder, file (.*proj
) , display name in visual studio:
- close solution.
- rename folder(s) outside visual studio. (rename in tfs if using source control)
- open solution, ignoring warnings (answer "no" if asked load project source control).
- go through unavailable projects and...
- open properties window project (highlight project , press alt+enter or f4, or right-click > properties).
- set property 'file path' new location.
- if property not editable (as in vs2012), open
.sln
file directly in editor such notepad++ , update paths there instead. (you may need check-out solution first in tfs etc.)
- if property not editable (as in vs2012), open
- reload project - right-click > reload project.
- change display name of project, highlighting , pressing f2, or right-click > rename.
note: other suggested solutions involve removing , re-adding project solution break project references.
if perform these steps might consider renaming following match:
- assembly
- default/root namespace
- namespace of existing files (use refactor tools in visual studio or resharper's inconsistent namespaces tool)
also consider modifying values of following assembly attributes:
assemblyproductattribute
assemblydescriptionattribute
assemblytitleattribute
you may wish vote visual studio team automate procedure.
Comments
Post a Comment