Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renaming a folder should rename the corresponding namespace #9626

Open
drewnoakes opened this issue Dec 20, 2024 · 1 comment
Open

Renaming a folder should rename the corresponding namespace #9626

drewnoakes opened this issue Dec 20, 2024 · 1 comment
Labels
Area-C# Specific to the C# language. Area-VisualBasic Specific to the VB.NET language.

Comments

@drewnoakes
Copy link
Member

drewnoakes commented Dec 20, 2024

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.

@drewnoakes drewnoakes added Area-C# Specific to the C# language. Area-VisualBasic Specific to the VB.NET language. labels Dec 20, 2024
@drewnoakes
Copy link
Member Author

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;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-C# Specific to the C# language. Area-VisualBasic Specific to the VB.NET language.
Projects
None yet
Development

No branches or pull requests

1 participant