dotnet/msbuild
GitHub で見るWarn about WriteLinesToFile default behavior which is Append
Open
#11,927 opened on 2025年5月29日
help wantedtriaged
Repository metrics
- Stars
- (5,062 stars)
- PR merge metrics
- (平均マージ 11d 7h) (30d で 125 merged PRs)
説明
WriteLinesToFile appends by default unless you specify Overwrite. This is highly non-intuitive and probably almost never what the user intends.
Since we can't change the behavior, I propose to introduce a new optional parameter Append, that defaults to false, and if it's not specified and Overwrite is not specified, warn about it (that you should specify one or the other).
Not sure if a warning or a message, perhaps build check?