Skip to content

[Feature Suggestion]: Renaming a file should rename the containing class; renaming a folder should rename the namespace in all affected files #127

@just-ero

Description

@just-ero

Describe the feature you'd like

This is concerning the solution explorer view.

In Visual Studio, renaming any *.cs file can prompt the user, asking whether the contained class should also be renamed (as long as the names matched). The same thing happens with folders, which will prompt the user, asking whether the namespace should be renamed as well (given the namespaces matched the folder structure thus far). All files referencing this namespace will then be adjusted, including using directives in files not related to this hierarchy at all.

This feature would be nice to have in Visual Studio Code as well. Ideally, the prompts should go both ways: renaming a class or namespace should prompt the user, asking whether the file or folder should be renamed too.

Alternatives considered

No response

Environment Information

  • OS version: Windows_NT x64 10.0.22621
  • VS Code version: Code 1.79.0 (b380da4ef1ee00e224a15c1d4d9793e27c2b6302, 2023-06-07T14:26:35.552Z)
  • Extension version: 0.1.83

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions