dotnet / dotnet/msbuild

[BuildCheck Suggestion]: Flag usage of the Properties metadata on inputs to the MSBuild Task like ProjectReference

Open
#12,659 0 comments 0 reactions 0 assignees View on GitHub
Area: BuildCheck BuildCheck Suggestion triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 8h
Merged PRs (30d)
141

Description

### Summary

This is almost never correct - per-project Properties completely override the Properties on the MSBuild Task invocation itself - what is almost certainly intended is the use of AdditionalProperties on the input Projects to _add_ to the set of global properties.

### Background and Motivation

Internal discussion thread where users are setting Properties directly and then having lots of downstream problems with managing the projectreference protocol

### Sample issue or antipattern that the check should be flagging

Any use of Properties on a ProjectReference - especially those setting Configuration, TargetFramework, or Platform

### Sample output

_No response_

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.