Bug 58296 - dynamic usages broken in XM apps due to System.Runtime reference
Summary: dynamic usages broken in XM apps due to System.Runtime reference
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: Library (Xamarin.Mac.dll) ()
Version: 3.8.0 (d15-4)
Hardware: PC Mac OS
: Normal normal
Target Milestone: 15.4
Assignee: Chris Hamons
Depends on:
Reported: 2017-07-21 14:58 UTC by Chris Hamons
Modified: 2017-08-11 12:09 UTC (History)
4 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 Developer Community or GitHub 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 Chris Hamons 2017-07-21 14:58:24 UTC
New XM App:


			dynamic w = this;
			string x1 = this.Description;
			string x2 = w.Description;

Add reference to Microsoft.CSharp

Build and run. It will fail due to missing System.Runtime.

Manually adding:

    <Reference Include="System.Runtime" />

to the csproj works around it.

Same behavior in xbuild and msbuild.


When fixed, it needs to be added to the mmp regression test.
Comment 1 Chris Hamons 2017-07-31 20:59:45 UTC
Possible XI duplicate - https://bugzilla.xamarin.com/show_bug.cgi?id=57919
Comment 2 Sebastien Pouliot 2017-07-31 21:01:21 UTC
Different issues
Comment 3 Chris Hamons 2017-08-04 19:41:27 UTC
Turns out (via bisect) that https://github.com/xamarin/xamarin-macios/commit/e6c8223a8e6bf7ebde17e55e0f47a241dd09f855 fixes it, so https://bugzilla.xamarin.com/show_bug.cgi?id=57919 was "close enough".

This fix has already been cherry picked to 15.4, so this will be fixed in 15.4.
Comment 4 Chris Hamons 2017-08-04 19:49:09 UTC
Added a test https://github.com/xamarin/xamarin-macios/pull/2437