Every so often as we work through converting the Visual Studio builds over to MSBuild we stumble across a little quirk or entertaining bit of MSBuild XML that makes the team scratch its head. Dan sent this one around to the team a couple of weeks ago, and it's related to our previous post about unqualified metadata.
How many x's does the following MSBuild XML produce?
<Project DefaultTargets="Build" xmlns=http://schemas.microsoft.com/developer/msbuild/2003>
<Message Text="@(Foo) @(Bar)" Condition="'%(Foo.Identity)'=='%(Bar.Identity)'"/>
To make it easier we'll make the question multiple choice. Is the answer:
No cheating! You can't run this through MSBuild to find out. Take a guess first, then try it out.
[ Author: Neil Enns]