dotnet / dotnet/project-system

File nesting doesn't work due to case-sensitive file name comparisons

Open
#9,018 1 comment 0 reactions 0 assignees View on GitHub
Feature-File-Nesting Triage-Investigate
Dominant language
C#
Stars
1k
Forks
415
PR merge metrics
No merged PRs in 30d

Description

_This issue has a corresponding [ticket on Developer Community](https://developercommunity.visualstudio.com/t/File-nesting-doesnt-work-due-to-case-se/1555905). Please vote and comment there to make sure your voice is heard._

---

_[severity:It bothers me. A fix would be nice]_

File nesting needs to use case-insensitive comparison of file names so that files with the same name, but have a case changes, behave the same way. I feel that this is a bug in Windows systems where the file name's case is irrelevant.

For example the file names `app.config` and `App.config` are the same name, but file-nesting in the example below only works for one of them. The syntax also doesn't allow adding other variations of the name. This needs to become consistent by doing one of three following things:

1. Compare file names in a case-insensitive manner.
2. Add an option to the syntax below to perform case-insensitive compares
3. Allow adding more than file variation of a file's name

```json
{
"root": false,
"dependentFileProviders": {
"add": {
"fileToFile": {
"add": {
"App.config": [
"App.config.template"
]
}
}
}
}
}
```

![Be84a7ec315784d14869befaaa241c430637700564257847896_FileNesting](https://github.com/dotnet/project-system/assets/350947/4963b019-db90-47e7-9a8e-e0ea8aabbdd6)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.