Add support for specifying folders that aren't namespace providers. #71956
Unanswered
tacosontitan
asked this question in
Ideas
Replies: 1 comment
-
Related (or dupe of?): dotnet/project-system#5372 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
IDE0130 helps keep namespaces equivalent to the folder structure, and I completely agree with it. However, on occasion, I have a folder that exists purely for organizational benefit and should not be part of the namespace. A good example is the framework project I maintain at work where we define many extensions for
IServiceCollection
as part of ourRuntime.DependencyInjection
namespace to support our ecosystem, and these are broken down into separate files:Each of these files is defined as:
Unfortunately for this use case, according to IDE0130, the namespace should be adjusted to add the
SeviceCollectionExtensions
folder effectively becomingRuntime.DependencyInjection.ServiceCollectionExtensions
; this forces us to import two namespaces when working with our dependency injection extensions simply because of an organizational decision we made.JetBrains products have a way for us to specify that a folder isn't a namespace provider, and I'd love to be capable of specifying that a folder is not a namespace provider at the
.csproj
level, so something like:I initially thought maybe
Folder
orNone
could be used with an additional property like:However, given that I don't have enough experience with those yet, please take that with a grain of salt; this discussion is mostly to bring the idea forward for community feedback.
Beta Was this translation helpful? Give feedback.
All reactions