Bug 24211 - Property references in item metadata are not resolved
Summary: Property references in item metadata are not resolved
Status: NEW
Alias: None
Product: Tools
Classification: Mono
Component: xbuild ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2014-11-02 00:22 UTC by Greg Najda
Modified: 2015-06-26 19:23 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report for Bug 24211 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Greg Najda 2014-11-02 00:22:17 UTC
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <It Include="foo">
  <Target Name="Test">
    <Message Text="It.Meta=@(It->'%(Meta)')" />

output of msbuild /t:Test: It.Meta=PropValue
output of xbuild /t:Test: It.Meta=$(Prop)
xbuild verson:
Comment 1 Marcin Cieślak 2015-06-26 19:17:36 UTC
This problem (still there as of Mono master - 4b675b9fbf4d2cba2adf7fea91ba8793801781ec

This breaks CoreCLR build, passing unresolved variable to resgen.exe via Exec, which results in:

          Task "Exec"
            Using task Exec from Microsoft.Build.Tasks.Exec, Microsoft.Build.Tasks.v12.0, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
            Executing: /usr/local/bin/mono "/usr/local/lib/mono/4.5/resgen.exe" "/home/saper/git/coreclr/src/mscorlib/src/mscorlib.txt" "/home/saper/git/coreclr///bin/obj/FreeBSD.x64.Debug/mscorlib.resources" /D:INCLUDE_DEBUG /D:INCLUDE_RUNTIME /D:$(DefineConstants)
            Environment variables being passed to the tool:
            /tmp/tmp63e516d3.tmp: DefineConstants: not found
            Read in 2453 resources from '/home/saper/git/coreclr/src/mscorlib/src/mscorlib.txt'
            Writing resource file...  Done.
            Tool sh execution finished.
          Done executing task "Exec"

$(DefineConstants) is a property defined in a very similar way as stated above.
Comment 2 Marcin Cieślak 2015-06-26 19:23:02 UTC
Similar item/property interpolation problem: https://bugzilla.xamarin.com/show_bug.cgi?id=16465