Bug 53149 - [MSBuild] ResolveAssemblyReference is crashing when trying to build md-addins.sln
Summary: [MSBuild] ResolveAssemblyReference is crashing when trying to build md-addins...
Alias: None
Product: Tools
Classification: Mono
Component: msbuild ()
Version: unspecified
Hardware: PC Mac OS
: --- blocker
Target Milestone: ---
Assignee: Ankit Jain
Depends on:
Reported: 2017-03-08 12:38 UTC by David Karlaš
Modified: 2017-03-08 20:55 UTC (History)
1 user (show)

Is this bug a regression?: Yes
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 David Karlaš 2017-03-08 12:38:47 UTC
Here is crash stack:

With some debugging I came to this finding... It's trying to compare "mscorlib, Version=, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes" with "mscorlib, Version=, PublicKeyToken=b77a5c561934e089", problem is that that if AssemblyName has Retargetable=Yes set, it must have "Culture=neutral"(which is not set in 1st assembly) set, or exception is thrown: https://github.com/mono/mono/blob/abf1a37e2e33ac40b90b16448dfddde7dd7c29d7/mono/metadata/assembly.c#L2489

To reproduce this... build Xamarin Studio(monodevelop + md-addins) and then enter md-addins and run:"msbuild md-addins.sln /p:Configuration=DebugMac"

I'm able to reproduce this with latest 2017-02 build from wrench.
Comment 1 Ankit Jain 2017-03-08 15:46:56 UTC
I have a fix for the `Culture=neutral` issue, but now the `md-addins` build is stuck at a XM issue, which Chris Hamons possibly has a fix for. Waiting for that.
Comment 2 Ankit Jain 2017-03-08 20:54:54 UTC
Fixed in https://github.com/mono/msbuild/commit/be0695954bcfb9f14ff5a40d6910bc228c4b20fd

. FYI, this fixes the specific issue reported here. The md-addins build breaks on a XM issue now.