Is it possible to configure a custom namespace syntax relative to the folder? Specifically, ignore numbers

Hey there,

I was wondering if it was possible to make Resharper ignore certain parts of the folder name?

For example, I like to use more of a “vertical slice architecture” - and sort the folders in a more logical hierarchy.

So this in a simplified concrete example, the folder structure would be something like:

  • Features/1 - Core/
  • Features/2 - LowLevelComponents/
  • Features/3 - HighLevelComponents/

Resharper then wants a Namespace structure in code of:

  • Project.Features._1___Core
  • Project.Features._2___LowLevelComponents
  • Project.Features._3___HighLevelComponents

I can turn off namespace checking all together, but then I risk having a really poor namespace structure when I'm moving files around to different folders, and I don't manually put classes in the correct namespace. 

So I'd prefer if I could configure resharper to ignore and exclude the whole `_1___` part, and just name the namespace Project.Features.Core - if that's possible.

Thanks

1
1 comment
Hello Ron,
thank you for contacting us.
Unfortunately, there is no way to configure a custom rule for namespace. We have an issue about it: https://youtrack.jetbrains.com/issue/RSRP-480517/ability-to-change-namespace-name-for-namespace-provider-folder, you are welcome to comment on it and vote.
Thank you!
0

Please sign in to leave a comment.