© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
45 replies
Sygmond

Inconsistent namespaces

(Solved) I'm currently working on a solution with a lot of subfolders and I noticed that the namespaces of .cs files are not reflecting the folder structure.
On top of that, in some projects, i.e. the files inside "Commands" and "Queries" have the same namespace and in other projects they have wrong namespace like ending in "Messages" while the folder name is Queries.

I would be able to fix this automatically in Rider by naming all namespaces according to folder structure but I'm afraid I will end up having hundreds of 10 levels long namespaces and usings.

Other solution is to go in every file and understand the pattern that was used in naming the namespaces and correct the wrong ones (this will take a lot of time).
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅ namespaces
C#CC# / help
3y ago
ILSpy decompiles namespaces incorrectly
C#CC# / help
16mo ago
are theses considered namespaces?
C#CC# / help
2y ago
Inconsistent accessibility parameter
C#CC# / help
16mo ago