dotnet / dotnet/project-system
Renaming a file to a .cs file causes extra items in the project file
- Dominant language
- C#
- Stars
- 1k
- Forks
- 415
- PR merge metrics
- No merged PRs in 30d
Description
From @NickCraver on twitter: https://twitter.com/Nick_Craver/status/1150201135095066624
Repro:
1. Right click, add a class
2. File.Test as the name, enter
3. Because of the . in there, .cs wasn't appending, so F2 on file and change to File.Test.cs
4. This is in the .csproj:

This is probably just None globbing (#4534) but maybe there is a small fix to be made in CPS to specifically improve the rename scenario.
Contributor guide
Research direction
Reproduce the rename sequence in Visual Studio: add a class named File.Test, then rename it to File.Test.cs and inspect the resulting .csproj. Read the related None globbing issue #4534 and the CPS behavior around the rename. Done means the project file no longer gains the extra items shown in the report.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100