Open vsfeedback opened 4 years ago
How I would like to see this implemented:
Include in Namespace
boolean property to folders that indicates whether the folder is purely for organizational purposes or should be reflected in the namespace of classes or interfaces created in that folder. Default this to true since that is the current behavior.Include in Namespace
property is set to false
, do not include that folder name as part of the namespace.Include in Namespace
set to false
, show it as a different color so that visually you can easily identify which folders are part of the namespace, and which are not, when looking at the structure in the solution explorer.New namespace folder
and New organizational folder
to allow for direct creation of the specific type of folder you want without having to manually tweak the settings on that folder.I would like this feature. I think all that is necessary is an option on the folder in the properties tab that turns it off (thus skipping this folder as a part of namspace naming). This would also be the default option for sub-folders of a folder with it off.
Is there not an option to disable this at the project level? This is extraordinarily irritating for those of us that do not used folders as namespaces.
I don't believe there is. This appears to represent a small minority position. We'll have to weigh the cost of doing this, versus everything else, versus the size of the ecosystem that benefits from it.
I would like to see this too, in smaller projects, it sometimes makes sense to organize files into folders, but use one namespace for all objects.
I would like to see this too, in smaller projects, it sometimes makes sense to organize files into folders, but use one namespace for all objects.
example: Organizing models in a meaningful folder structure that does not participate in namespace naming but keeps them all in the Models namespace.
I don't believe there is. This appears to represent a small minority position. We'll have to weigh the cost of doing this, versus everything else, versus the size of the ecosystem that benefits from it.
I don't think this represent a small minority. JetBrains Rider provided an option for this in a much more sophisticated way. Frankly if I can afford it, I will ditch Visual Studio with no hesitation. All you need to do is to provide a boolean option in the Solution Explorer's Folder Properties, say NamespaceProvider
that determines whether the folder name will be included in the namespace or not.
@aLexiusxx this is on our backlog. So if you wanted to contribute the fix of "All you need to do is...", We would likely take it. Thanks!
I've wanted this for 20 years. Maybe it'll happen after I retire. It has just never made sense for a namespace to be tightly coupled to a file's location in a filesystem. They have dick-all to do with one another. All I want is for a new file to always just have a single namespace that is specified in the .csproj file. That would solve it for 95% of us.
I've wanted this for 20 years. Maybe it'll happen after I retire. It has just never made sense for a namespace to be tightly coupled to a file's location in a filesystem. They have dick-all to do with one another. All I want is for a new file to always just have a single namespace that is specified in the .csproj file. That would solve it for 95% of us.
Spoken like a true vet! I am vehemently opposed to close-sourced tech like Rider but it's "namespace-provider" folder option is AWESOME!!!
This issue has been moved from a ticket on Developer Community.
When a new class is created under a folder, Visual studio automatically appends the folder name to the namespace. This is very difficult to catch in codereviews and in some common libraries changing this later becomes extremely hard.
Please provide an easy way to disable this in csproj.
Original Comments
Visual Studio Feedback System on 6/23/2020, 00:34 AM:
We have converted this feedback item from problem to idea. This change was done to better reflect the feedback's nature.
Visual Studio Feedback System on 6/24/2020, 02:55 AM:
Thank you for taking the time to provide your suggestion. We will do some preliminary checks to make sure we can proceed further. We'll provide an update once the issue has been triaged by the product team.