Potential incrementality issue in GenerateTargetFrameworkMonikerAttribute #9840
Open
Description
opened on Mar 7, 2024
msbuild/src/Tasks/Microsoft.Common.CurrentVersion.targets
Lines 3667 to 3689 in 9af8ff2
I think the problem is that the condition on the target doesn't match the condition on the WriteLinesToFile task. I think we should add and '$(TargetFrameworkMonikerAssemblyAttributeText)' != ''
to the Condition on the Target.
The target runs (because the output file doesn't exist), but then the tasks are skipped because the text is empty, and so it doesn't write the file again.
It's benign, but would be nice to get it out of the way for build incrementality investigations (the less targets run in an incremental build the easier it is to see targets which are breaking incrementality and shouldn't be running)
Activity