VS: De-duplicate dependencies to avoid VS 2019 msbuild regression
Avoid listing the same input more than once in custom commands generated in .vcxproj
and .csproj
files. In the case of a .vcxproj
file additionally avoid listing the source to which the command is attached since it is already implicitly a dependency.
This is a nice cleanup and also works around a VS 2019 16.1 regression in MSBuild dependency checking. Starting with that version, MSBuild now re-builds custom commands when the list of dependencies has changed. However, its check is confused by duplicate dependencies. De-duplicating them avoids this problem.
See-also: issue as reported to Microsoft
Fixes: #19303 (closed)
Topic-rename: vs-depends-dedup
Edited by Brad King