Skip to content

Issue a warning for duplicate items (Compile, Reference, ProjectReference) #804

Open
@KirillOsenkov

Description

@KirillOsenkov

I think MSBuild tooling should issue a warning if it encounters duplicate items such as Compile, Reference or ProjectReference. We've had bugs in Roslyn not handling duplicate items properly and I'm imagining there could be other negative repercussions from having duplicate items.

We've thought about adding the warning to the project system but it feels like they should be issues uniformly regardless of whether you're using command line build or IDE build.

There are separate bugs to harden Roslyn against duplicate items and do deduplication on all entrypoints.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BuildCheck SuggestionSuggestion for a built in MSBuild analyzer. Label should be applied together with 'Area: BuildCheck'Feature: Warning WavesWarnings to enable in opt-in waves. Formerly "strict mode".Priority:2Work that is important, but not critical for the releasetriaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions