Skip to content

Renaming a folder should rename the corresponding namespace #9626

Open

Description

@drewnoakes

Given a structure like:

MyProject
   MyComponent
      MyClass.cs

Where MyClass.cs has content:

namepsace MyProject.MyComponent;

class MyClass {}

Renaming the MyComponent folder in Visual Studio's Solution Explorer should rename the MyComponent namespace.

Activity

  1. added
    Area-C#
    Area-VisualBasic
    on Dec 20, 2024
  2. drewnoakes commented on Dec 20, 2024

    @drewnoakes
    MemberAuthor

    Today we explicitly exclude folder renames here:

    if (project is null ||
    await IsAutomationFunctionAsync() ||
    node.IsFolder ||
    _vsOnlineServices.ConnectedToVSOnline ||
    FileChangedExtension(oldFilePath, newFileWithExtension))
    {
    // Do not display rename Prompt
    return;
    }

  3. added
    Triage-Approved
    on Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-C#Area-VisualBasicTriage-Approved

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions