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 aspx/razor/etc files won't rename their classes #9292

Open
drewnoakes opened this issue Oct 20, 2023 · 2 comments
Open

Renaming aspx/razor/etc files won't rename their classes #9292

drewnoakes opened this issue Oct 20, 2023 · 2 comments
Assignees
Labels
Bug This is a functional issue in already written code. Feature-Solution-Explorer Issues related to cut/copy/paste, drag drop, and general iteraction with Solution Explorer. Triage-Approved Reviewed and prioritized
Milestone

Comments

@drewnoakes
Copy link
Member

drewnoakes commented Oct 20, 2023

Inspired by AB#1886228

image

  1. Create a .NET WPF application
  2. In Solution Explorer, rename MainWindow.xaml to MainWindow2.xaml
  3. MainWindow.xaml.cs is also renamed, however the corresponding type is not renamed

This also works for .razor/.razor.cs files. Possibly others. In the case of razor, the mismatched type and file names cause the generated code to become disconnected from the page itself, requiring manual renames to fix.

@drewnoakes drewnoakes added the Bug This is a functional issue in already written code. label Oct 20, 2023
@drewnoakes drewnoakes self-assigned this Oct 20, 2023
@drewnoakes drewnoakes added the Feature-Solution-Explorer Issues related to cut/copy/paste, drag drop, and general iteraction with Solution Explorer. label Oct 20, 2023
@drewnoakes
Copy link
Member Author

Jeremy's comment on the original feedback ticket explains the Razor scenario very clearly. Thanks!

@drewnoakes drewnoakes added the Triage-Approved Reviewed and prioritized label Oct 26, 2023
@drewnoakes drewnoakes added this to the Backlog milestone Oct 26, 2023
@drewnoakes
Copy link
Member Author

Would benefit from having an API to wait on the language service (#3425).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a functional issue in already written code. Feature-Solution-Explorer Issues related to cut/copy/paste, drag drop, and general iteraction with Solution Explorer. Triage-Approved Reviewed and prioritized
Projects
None yet
Development

No branches or pull requests

1 participant