Realign namespace definitions with file structure

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?).


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.

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

Need Your Help

Multiple simultaneous HTTP requests using .NET networking libraries

c# .net http networking asynchronous

I have a number of devices (IP cameras) in dedicated LAN segment, connected to PC. Devices support individual JPEG frames transfers using HTTP protocol.

How to create different constraints for iphone 5 and iphone 6

ios ios8 autolayout iphone-5 iphone-6

Is it possible to create a constraint specifically for iPhone 4s and 5s without affecting iPhone 6?