dotnet / dotnet/project-system
Renaming file extensions should be more VS-code like
- Dominant language
- C#
- Stars
- 1k
- Forks
- 415
- PR merge metrics
- No merged PRs in 30d
Description
**Visual Studio Version**: 16.9.4
**Summary**:
Accidentaly creating a file of a wrong type (say .cs instead of .razor), and renaming it's type, will have unexpected side effects (no source code completion, added `` in .csproj)
**Steps to Reproduce**:
1. Create an Asp.Net Core Project.
2. Add a class "MyPage.cs" to the project.
3. Rename the file to "MyPage.razor".
4. Look at the .csproj and see changes, modifying the .razor.
**Expected Behavior**:
Visual Studio detects the rename and resets source code completion for that file and does not add artifacts to the .csproj (as VSCode does)
**Actual Behavior**:
Source Code completion failes due to wrong build-action.
**User Impact**:
Either file needs to be recreated or .csproj needs to be modifyied by hand.
**Proposal**:
Do not create `` artifacts in .csproj on renaming files - especially not, if there's nothing specific configured
Or even "better" please allow to create arbitrary files with all default settings in place, like vs-code does.
Contributor guide
Assessment
This issue has not been assessed yet.