Bug 39933 - XBuild doesn't handle metadata in items properly (at all)
Summary: XBuild doesn't handle metadata in items properly (at all)
Alias: None
Product: Tools
Classification: Mono
Component: xbuild ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2016-03-27 18:13 UTC by svetomech
Modified: 2018-03-15 10:40 UTC (History)
3 users (show)

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

This is an excerpt from a test.csproj file. (348 bytes, text/plain)
2016-03-27 18:13 UTC, svetomech

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 on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description svetomech 2016-03-27 18:13:44 UTC
Created attachment 15530 [details]
This is an excerpt from a test.csproj file.

I was trying to convert working MSBuild tasks to XBuild ones (e.g. had to change Move to Copy since Xbuild doesn't have that) when another issue popped up: XBuild doesn't handle metadata contained in items. See below.

MSBuild copies all resources in their appropriate subfolders, e.g. "$(TargetDir)\ru\test.resources.dll" to a folder of my choosing (e.g. folder named "languages"), resulting in following structure: "$(TargetDir)\languages\ru\test.resources.dll", whereas XBuild creates a folder named "@(_OutDirItem->'%(FullPath)')languages" (see attachment for clarity) in the project root and copies given resource there (not caring for subdirectory this file was in!).

I'm hoping this will be resolved soon.
Comment 1 daryl5 2016-10-15 14:37:10 UTC
Can confirm, have the same issue, MSBuild is working as expected.
Comment 2 Marek Safar 2018-03-15 10:40:04 UTC
We deprecated xbuild and recommend using msbuild instead. Switching to msbuild will also most likely resolve the issue you reported.