dotnet / dotnet/project-system
Renaming aspx/razor/etc files won't rename their classes
- Dominant language
- C#
- Stars
- 1k
- Forks
- 415
- PR merge metrics
- No merged PRs in 30d
Description
Inspired by [AB#1886228](https://devdiv.visualstudio.com/0bdbc590-a062-4c3f-b0f6-9383f67865ee/_workitems/edit/1886228)

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.
Contributor guide
Assessment
This issue has not been assessed yet.