Bug 31067 - [Xamarin.iOS] MT2002 Link SDK assemblies only
Summary: [Xamarin.iOS] MT2002 Link SDK assemblies only
Alias: None
Product: iOS
Classification: Xamarin
Component: Debugger ()
Version: XI 8.10
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2015-06-12 10:49 UTC by ppare
Modified: 2015-06-18 05:25 UTC (History)
2 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 ppare 2015-06-12 10:49:19 UTC
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=, 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.
Comment 1 Rolf Bjarne Kvinge [MSFT] 2015-06-17 03:15:07 UTC
It looks like you're pulling in a desktop version of System.Core somehow (the version should be, not

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.
Comment 2 ppare 2015-06-17 15:47:31 UTC
We found the problem, we have a project for windows that is referenced. That's probably where the 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?
Comment 3 Rolf Bjarne Kvinge [MSFT] 2015-06-18 05:25:23 UTC
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.