Bug 4811 - AllowedReferenceRelatedFileExtensions is not implemented correctly
Summary: AllowedReferenceRelatedFileExtensions is not implemented correctly
Alias: None
Product: Tools
Classification: Mono
Component: xbuild ()
Version: unspecified
Hardware: PC Windows
: High normal
Target Milestone: ---
Assignee: Mikayla Hutchinson [MSFT]
Depends on:
Reported: 2012-05-01 18:05 UTC by Mikayla Hutchinson [MSFT]
Modified: 2013-10-21 14:42 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 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 Mikayla Hutchinson [MSFT] 2012-05-01 18:05:49 UTC
xbuild implements AllowedReferenceRelatedFileExtensions by appending to the filename:
string rfile = filename + ext;

This is demonstrably incorrect, as it breaks the Mono for Android targets, which set AllowedReferenceRelatedFileExtensions to .dll.mdb;.exe.mdb

So it should actually be:
string rfile = Path.ChangeExtension (filename, ext);
Or maybe both? Needs testing.

Correspondingly, the default value of the AllowedReferenceRelatedFileExtensions property in all the xbuild targets will have to be changed from:

Note the .xml, added for additional compatibility with MSBuild behavior, as documented in ResolveAssemblyReference docs on msdn.
Comment 1 robin.neatherway 2013-02-15 10:21:49 UTC
I am hitting this bug, and agree with the changes suggested here, although Visual Studio seems to generate files with a .XML extension unhelpfully. Perhaps this search can be case-insensitive?
Comment 2 Mikayla Hutchinson [MSFT] 2013-10-21 14:42:38 UTC
Fixed merged.