dotnet / dotnet/msbuild

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

Open
#804 4 comments 4 reactions 0 assignees View on GitHub
BuildCheck Suggestion Feature: Warning Waves Priority:2 triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 13h
Merged PRs (30d)
133

Description

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.