Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
Created attachment 4738 [details]
Xamarin Studio 4.0.9 (build 12).
Android application which uses class, inherited from System.Data.Services.Client.DataServiceContext.
Application works fine when build without linker.
As soon as linker enabled we observe an exception (attached).
In the constructor of System.Data.Services.Client.TypeSystem reflection is used. Linker removes unused methods and properties of System.String, System.DateTime, System.Math (reflection is applied to these classes), so DataServiceContext becomes unusable.
We can fix it by using custom linker rules:
But seems, that it's a bug of linker. These code parts should not be removed by linker in case of TypeSystem is used by application.
@Alex: We should add custom linker rules for when System.Data.Services.Client.dll is referenced so that the appropriate types are preserved.
This *should* be fixed (I've added a linker descriptor file that preserves the needed methods), but I need a sample to verify to be 100% sure.
*** Bug 14545 has been marked as a duplicate of this bug. ***
I'm in production and not ready to upgrade just yet. I'd love to know where to put that <linker> xml element referenced above for a quick fix until I can upgrade.
Created attachment 5249 [details]
If I understand your question correctly, then you should put linker.xml file (I had attached it) into Properties folder of your project (for Android Project). Is the same location as for AndroidManifest.xml file. Once done, choose "LinkDescription" as build action for this file (Right mouse click on file -> Build Action).
Shoot, I included the file you attached in the properties folder alongside androidmanifest.xml, included it in the project, made its build action LinkDescription, and tried both values for copy to output directory- same exact error, surely because of the wcf web services reference.
Thanks anyway for your help, I appreciate it.
Nevermind- it turns out that I was using the free edition and was unable to use linker files, but VS never told me it was just ignoring my commands.
This worked perfectly- thanks very much.