dotnet / dotnet/project-system

Change default namespace associated to a folder when creating new class

Open
#5,372 53 comments 109 reactions 0 assignees View on GitHub
Triage-Approved
Dominant language
C#
Stars
1k
Forks
415
PR merge metrics
No merged PRs in 30d

Description

_This issue has a corresponding [ticket on Developer Community](https://developercommunity.visualstudio.com/content/idea/572969/change-default-namespace-associated-to-a-folder-wh.html). Please vote and comment there to make sure your voice is heard._

---
It would be nice if there is a feature to set a default namespace for each folder when creating a new class. For example, if we have the following file structure:

```
MyProject
MyFolder
MyClass1
```

Then if we create `MyClass2` under `MyFolder`, the created class will be under the `MyProject` namespace instead of `MyProject.MyFolder`.

Additional references: https://stackoverflow.com/questions/1317901/change-default-namespace-when-creating-class-in-folder-visual-studio

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.