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.
When debugging with linker behaviour set to "Link SDK assemblies only", we get:
Error MT2002: Failed to resolve "System.Void System.Security.Cryptography.SHA256CryptoServiceProvider::.ctor()" reference from "System.Core, Version=18.104.22.168, Culture=neutral, PublicKeyToken=b77a5c561934e089" (MT2002)
Using "Link all assemblies does solve this problem, but makes the application crash on a device because reflection seems to be impossible on certain objects.
It looks like you're pulling in a desktop version of System.Core somehow (the version should be 22.214.171.124, not 126.96.36.199).
Can you please add "-v -v -v -v" to the additional mtouch arguments in the project's iOS Build options, rebuild, and attach the complete build log? This would tell us where System.Core.dll is coming from.
We found the problem, we have a project for windows that is referenced. That's probably where the 188.8.131.52 comes from. Even if we have the error, it compiles and runs perfectly. What I think is happening, System.Core is referenced in our iOS application and even though it outputs an error, it would take the iOS one at runtime. Does that make sense to you?
Yes, one possible explanation is that the windows project that was referenced uses API from the desktop version of System.Core.dll and which doesn't exist in the Xamarin.iOS version, and that caused trouble for the linker.