ReSharper 2016.2 Help

Fix inconsistent namespace naming

You have probably seen that, when the namespace declaration does not match the file location and/or project settings, ReSharper warns you about it and allows to correct it:

ReSharper quick-fix to synchronize namespace to the file location

However, if you have several files with incorrect namespaces, going through them one by one can be a pain. Luckily, you can simply press Ctrl+Shift+R on a node in the Solution Explorer and select Adjust Namespaces:

ReSharper helps fix namespaces in a project

This will pop up a dialog letting you select all files where namespaces need to be adjusted:

Synchronizing namespaces with project structure

After you pick the namespaces to fix, they will be adjusted to their expected values (dependent upon project settings and file location).

See Also

Last modified: 15 December 2016