Bug 16465 - xbuild can not pass a flattened Item collection to MSBuild task via a property
Summary: xbuild can not pass a flattened Item collection to MSBuild task via a property
Status: NEW
Alias: None
Product: Tools
Classification: Mono
Component: xbuild ()
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-11-26 14:34 UTC by Fraser Ruffelll
Modified: 2015-06-26 19:26 UTC (History)
2 users (show)

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


Attachments
Example build script, with an output log for each xbuild and msbuild. (2.05 KB, application/zip)
2013-11-26 14:34 UTC, Fraser Ruffelll
Details


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 16465 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:
Status:
NEW

Description Fraser Ruffelll 2013-11-26 14:34:18 UTC
Created attachment 5547 [details]
Example build script, with an output log for each xbuild and msbuild.

I would like to pass an Item collection to a target invoked via an MSBuild task. The MSBuild task allows for only properties to be passed (via the Properties) property, and not items. A common way around this is to flatten the Items to a string with each item separated by a semi-colon, and in the target being called reconstruct the Item collection. When I try this, xbuild complains about Properties being malformed (probably because of the confusion between a semicolon separating each property, and a semi-colon within the property's value).

I've attached an example script, with a log file for MSBuild (4.0.30319.18408), and a log file for xbuild (3.2.5.0).

A workaround would be to flatten with a character other than ';', and then replace this character in the called target with the ';' again, and then reconstruct the Items. This adds a lot of script code if done often.

Is there a simpler way to work around this? Thanks!
Comment 1 Marcin Cieślak 2015-06-26 19:26:52 UTC
Same effect with the current mono master (4b675b9fbf4d2cba2adf7fea91ba8793801781ec)


Possibly related: https://bugzilla.xamarin.com/show_bug.cgi?id=24211