I have a class with a namespace not matching the folder structure of the project.
With // ReSharper disable once CheckNamespace
I can disable the hint that the namespace does not correspond to the file-location. But when Refactoring the Projects namespaces, the class is still selected for adjusting the namespace.
Is there a way to disable the adjust namespace?
Update with sample:
In my case I have a view class that has to be in the System.Web.Mvc
-Namespace.
The file location is [Root]>src>Views
The default namespace of the Root-Project is Com.xxxxx.Commons.Web
So Resharper always wants to adjust the namespace to either
Com.xxxxx.Commons.Web.Views
or to Com.xxxxx.Commons.Web
if I disable the namespace-provider-flag für the Views folder.
Unfortunately it's a long existing bug in R# that disable CheckNamespace
isn't respected by the "Adjust namespaces" refactoring. As I know, there is no other way to exclude specific files from this refactoring.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With