Conditions on item metadata are evaluated even for empty item group
Open
Area: Engine
help wanted
triaged
- Dominant language
- C#
- Stars
- 5.5k
- Forks
- 1.5k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 141
Description
### Steps to reproduce
Project file
```xml
not P
```
I'd expect the condition to not be evaluated since `@(Empty)` is empty, so there are no items being added to `X`.
### Expected behavior
No error reported.
### Actual behavior
```
error MSB4113: Specified condition "!%(P)" evaluates to "!" instead of a boolean.
```
### Environment data
`msbuild /version` output:
Microsoft (R) Build Engine version 15.9.14-preview+gae560092f5 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
15.9.14.22190
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.