dotnet/msbuild
Vedi su GitHubConditions on item metadata are evaluated even for empty item group
Open
#4056 aperta il 9 gen 2019
Area: Enginehelp wantedtriaged
Metriche repository
- Star
- (5062 star)
- Metriche merge PR
- (Merge medio 11g 7h) (125 PR mergiate in 30 g)
Descrizione
Steps to reproduce
Project file
<Project>
<Target Name="Build">
<ItemGroup>
<X Include="@(Empty)">
<M Condition="!%(P)">not P</M>
</X>
</ItemGroup>
</Target>
</Project>
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