Created attachment 6812 [details]
System.Linq.Expressions.Expression is stripped by the linker when set to "Link SDK Assemblies Only"
Steps to reproduce:
1. Run the attached test project, make sure release configuration is selected and that the Linker is set as above (should be that way already)
2. Press the Click Me button
Expected behavior: No exception.
Actual behavior: A System.NullReferenceException is thrown.
This was resolved by adding an .xml file and skipping that type. This file is already in the test project with build action set to none. To get the expected behavior above:
1. Change the Build Action of the System.Core.xml file from "none" to "LinkDescription"
2. Run the test project
3. Press the Click me button
Expected behavior: no exception is thrown.
Actual behavior: no exception is thrown.
The contents of the System.Core.xml file are (for ease of reference to anyone else running into this issue):
I'm experiencing this problem in Xamarin.Mac 3.4.21, which doesn't support the LinkDescription build action, so the workaround doesn't work. Could someone from Xamarin take a look at this issue?
Visual Studio for Mac Preview
Version Preview 9 (7.0 build 2943)
Installation UUID: ff1ec941-a4ad-4b44-a3e0-6d0649e39920
Mono 22.214.171.124 (2017-02/ba317ed) (64-bit)
GTK+ 2.24.23 (Raleigh theme)
Package version: 500000078
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.0.0/lib/mono/msbuild/15.0/bin/Sdks
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
Build date: Fri, 21 Apr 2017 17:57:12 GMT
Apple Developer Tools
Xcode 8.3.2 (12175)
Version: 126.96.36.199 (Visual Studio Enterprise)
Version: 10.10.0.21 (Visual Studio Enterprise)
Build date: 2017-04-22 14:32:46-0400
Release ID: 700002943
Git revision: 66a6782a4635dbcdfb0b9bb3f076f46d8fc9b4b6
Build date: 2017-04-24 07:46:52-04
Xamarin addins: e7459e0d456fbb73c2661cfcd237235be4950936
Build lane: monodevelop-lion-d15-2
Mac OS X 10.12.4
Darwin 16.5.0 Darwin Kernel Version 16.5.0
Fri Mar 3 16:52:33 PST 2017