dotnet / dotnet/project-system
Files linked into ResX files are not checked by the FUTDC
- Dominant language
- C#
- Stars
- 1k
- Forks
- 415
- PR merge metrics
- No merged PRs in 30d
Description
When a `None` item (such as a text file) is linked into a `.resx` file, any changes to that `None` item do not trigger a build. This can lead to underbuild and confusion/frustration.
This problem did not exist with legacy projects as they explicitly list all project inputs in the `.csproj` file. SDK-style projects use globbing and do not include `None` items in the FUTDC for performance reasons.
## Repro steps
1. Open VS2022
2. Create console app
3. Add `LinkedFile.txt`
4. Add `Resources.resx` with content `prior`
5. Open the `.resx` file with the Managed Resources Editor
6. In _Files_ section, _Add existing file_ and select the `LinkedFile.txt`
7. Build a few times
Notice that `LinkedFile.txt` is not inspected at all by the FUTDC:
```
Comparing timestamps of inputs and outputs:
Adding UpToDateCheckBuilt outputs:
D:\MyProject\bin\Debug\net8.0\MyProject.dll
D:\MyProject\obj\Debug\net8.0\MyProject.dll
D:\MyProject\obj\Debug\net8.0\MyProject.pdb
D:\MyProject\bin\Debug\net8.0\MyProject.pdb
Adding newest import input:
D:\MyProject\MyProject.csproj
Adding EmbeddedResource inputs:
D:\MyProject\Resources.resx
Adding Compile inputs:
D:\MyProject\Resources.Designer.cs
D:\MyProject\Program.cs
No inputs are newer than earliest output 'D:\MyProject\obj\Debug\net8.0\MyProject.pdb' (2024-04-10 14:05:24.168). Newest input is 'D:\MyProject\Resources.Designer.cs' (2024-04-10 14:05:17.707).
Checking items to copy to the output directory:
Checking copy items from project 'D:\MyProject\MyProject.csproj':
Checking PreserveNewest item
Source 2024-04-10 14:05:24.203: 'D:\MyProject\obj\Debug\net8.0\apphost.exe'
Destination 2024-04-10 14:05:24.203: 'D:\MyProject\bin\Debug\net8.0\MyProject.exe'
Project is up-to-date.
Up-to-date check completed in 0.7 ms
```
Contributor guide
Assessment
This issue has not been assessed yet.