dotnet / dotnet/msbuild

[BuildCheck Suggestion]: Well-known properties applied as item metadata

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

Description

### Summary

It'd be great if we could scan for some patterns where a property (that we know about) is set instead as item metadata.

### Background and Motivation

"Things" in MSBuild are properties, items, or metadata on specific items. But if you hear "set X", it's hard to know which category X is in, and easy to make mistakes.

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

An anonymous dev hit some trouble with a NuGet package and tried to fix it by doing this

```xml

true

```

Looks convincing! But it's wrong, because `CopyLocalLockFileAssemblies` is a _project property_, not a per-package setting. Sure would be nice if MSBuild could help.

### 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.