dotnet/msbuild
Ver no GitHubConditions on item metadata are evaluated even for empty item group
Open
#4.056 aberto em 9 de jan. de 2019
Area: Enginehelp wantedtriaged
Métricas do repositório
- Stars
- (5.062 stars)
- Métricas de merge de PR
- (Mesclagem média 11d 7h) (125 fundiu PRs em 30d)
Description
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