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.)
    • 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:

  1. assembly
  2. default/root namespace
  3. namespace of existing files (use refactor tools in visual studio or resharper's inconsistent namespaces tool)

also consider modifying values of following assembly attributes:

  1. assemblyproductattribute
  2. assemblydescriptionattribute
  3. assemblytitleattribute

you may wish vote visual studio team automate procedure.


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -