The Adjust Namespaces refactoring helps you replace namespace name that doesn't correspond to the file location with the appropriate one. All files where current namespace is used also will be changed, a new using directive will be added.
- In the Solution Explorer window, select a node you want to apply the refactoring to.
- On the ReSharper menu or context menu, choose Refactor | Adjust Namespaces.
The Adjust Namespaces dialog box opens:
- Select the files you want to refactor and click Next.
TipAlternatively, you can use a quick-fix with identical functionality. Place the caret at the namespace name in the editor, press Alt+Enter to expand the list of quick-fixes and choose the Move declarations to namespace refactoring.