Skip to content

Instantly share code, notes, and snippets.

Created Jul 28, 2018
What would you like to do?
<?xml version="1.0" encoding="UTF-8"?>
<Project xmlns=""
<FooItem Include="Foo1" Meta="A" />
<FooItem Include="Foo2" Meta="B" />
<FooItem Include="Foo3" Meta="B" />
<FooItem Include="Foo4" Meta="C" />
<Target Name="Build">
<!-- $(FirstB) はバッチ実行前の値で評価されるので、これはうまくいかない -->
<FirstB Condition="'$(FirstB)' == '' AND '%(FooItem.Meta)' == 'B'">%(FooItem.Identity)</FirstB>
<!-- 期待した出力 → Foo2 -->
<!-- 実際の出力 → Foo3 -->
<Message Text="First: $(FirstB)" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment