dotnet / dotnet/project-system
Copy-pasting files matching globbing patterns produces spurious results
- Dominant language
- C#
- Stars
- 1k
- Forks
- 415
- PR merge metrics
- No merged PRs in 30d
Description
**Visual Studio Version**: 16.3.10
**Summary**: Possible Brock-Ackerman Anomaly in globbing / copy-pasting files matching globbed patterns
**Steps to Reproduce**:
1. Start with a csproj SDK file format with the following `ItemGroup`:
```xml
Always
App.config
Always
```
2. In the Visual Studio Solution Explorer, click on `App.config`, press control+C, control+V (doing copy-paste) results in a new file, named `App - Copy.config`.
3. Re-name that file App.Production.config
**Expected Behavior**:
1. No exception dialog should occur.
2. csproj file should not change (or should revert the "App - Copy.config`" temporary entry, because the re-named file should fall under the file-globbing pattern.
**Actual Behavior**:
1. Exception dialog occurs. 
2. The csproj generates spurious entries:
```xml
```
Further, creating an `App.Beta.config` on top of `App.config` and `App.Production.config` produces even more spruious behavior that is truly unexpected. Copying and renaming `App.config` to `App.Beta.Config` generates a spurious `App - Copy.Production.config`!
**User Impact**:
Lots of time wasted fiddling csproj files directly.
Contributor guide
Assessment
This issue has not been assessed yet.