Skip to content

[Built-in analyzer] The same file is written by multiple tasks during the build #9881

@ladipro

Description

@ladipro

Background

This issue tracks one of the BuildCheck analyzers we would like to ship in-box with MSBuild.

Goal

Implement an analyzer with the following rule: Each file written to disk during the build should be written only once. Also known as "double writes" analysis.

Notes

Writing the same file multiple times often leads to file access issues and non-deterministic builds. This analyzer will report the violation if it happens within one project as well as between multiple projects. It can be implemented by checking the parameters of well-known tasks like Copy and Csc (see the implementation in binlog viewer). Alternatively, it can be implemented based on target outputs, as used by the engine for up-to-date checks.

Metadata

Metadata

Assignees

Labels

Area: BuildCheckPriority:1Work that is critical for the release, but we could probably ship withouttriaged

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions