views:

88

answers:

2

Like all developers with OCD I try to organise my namespaces within our project so that they match where the file they are contained within sits of disk.

However after a pretty massive refactoring session within VS.NET I've moved files within projects and created new subfolders a plenty, leaving the refactoring of the namespaces to later believing that there must be a refactoring tool that will accomplish this for me once things have settled down. However I'm now not able to find such a tool!

Does anyone know of anyway to accomplish this automatically (ie. without me painstakingly going through 100s of files or even writing my own tool?).

+2  A: 

There are a couple of options:

  1. Use the Class View window to rename the namespaces.
  2. User "ReSharper" from jetbrains to do the refactoring.
Micah
(2) has kind of sailed now :) but I take your point about (1) that could well help to certain extent - still not quite as easy as I was hoping though!
Kieran Benton
A: 

You can use the Refactor->Rename function on a namespace, just as you would on any other identifier.

Coincoin