Fix inconsistent namespace naming

Skip to end of metadata
Go to start of metadata

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:

However, if you have several files with incorrect namespaces, going through them one by one can be a pain. Luckily, you can simply right-click the project in the solution explorer and select Refactor | Adjust Namespaces:

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

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

  • No labels