Skip to content

Comments

More rename #12480

Merged
davidwengier merged 8 commits intodotnet:mainfrom
davidwengier:MoreComponentRename
Nov 12, 2025
Merged

More rename #12480
davidwengier merged 8 commits intodotnet:mainfrom
davidwengier:MoreComponentRename

Conversation

@davidwengier
Copy link
Member

Part of #8541

Started poking at rename issues, and decided this was a big enough PR to put out as is. I think this is everything up until we need some Roslyn changes to help with more.

Reviewing commit at a time is probably easiest, as this does a few things:

  • Adds a bunch of tests for missed scenarios
  • Improves test infra and validation
  • Fixes a bug when renaming a component to a name that clashes with another component
  • Adds support for renaming .razor.cs and .razor.css files when we rename a .razor file

@davidwengier davidwengier requested a review from a team as a code owner November 12, 2025 03:46
Comment on lines +136 to +137
TryAdd(".cs");
TryAdd(".css");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like oldFilePath would be something like C:\Dir\MyFile.razor. So, if they'd exist, we'd be looking for C:\Dir\MyFile.razor.cs and C:\Dir\MyFile.razor.css. Is that right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is correct

Copy link
Contributor

@ToddGrun ToddGrun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@davidwengier davidwengier merged commit d62ba62 into dotnet:main Nov 12, 2025
11 checks passed
@davidwengier davidwengier deleted the MoreComponentRename branch November 12, 2025 22:11
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Nov 12, 2025
@davidwengier davidwengier modified the milestones: Next, 18.3 Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants