Bug 23232 - error MT2001: Could not link assemblies
Summary: error MT2001: Could not link assemblies
Status: RESOLVED DUPLICATE of bug 22893
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: XI 8.0.0
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: Untriaged
Assignee: Sebastien Pouliot
Depends on:
Reported: 2014-09-22 06:05 UTC by Michael Stonis
Modified: 2014-09-22 09:19 UTC (History)
3 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:

Comment 1 Parmendra Kumar 2014-09-22 08:23:41 UTC
I have checked this issue with the given step in bug description and I am also getting the same behavior given in bug description. I have observed that,
Build this project with linking enabled for "Link SDK assemblies only" or for "Link all assemblies", it will fail to build. If linking is "Don't Link", the project will build properly.

Screencast: http://screencast.com/t/dmoiqXfOLzhR
Build Output Log:https://gist.github.com/anonymous/c32bfc904fbffd4c1faf
IDE Log:https://gist.github.com/anonymous/ab24ad676f07e975fabf

Environment Info:

=== Xamarin Studio ===

Version 5.4 (build 240)
Installation UUID: 1a096c6f-0678-402e-89b2-a2c10f7e80e4
	Mono 3.8.0 ((no/45d0ba1)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 308000009

=== Xamarin.Android ===

Version: 4.16.0 (Business Edition)
Android SDK: /Users/360_macmini/Desktop/android-sdk-macosx
	Supported Android versions:
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		3.2    (API level 13)
		4.0    (API level 14)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
Java SDK: /usr
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)

=== Apple Developer Tools ===

Xcode 6.0.1 (6528)
Build 6A317

=== Xamarin.iOS ===

Version: (Business Edition)
Hash: 8bd8158
Build date: 2014-09-18 09:12:55-0400

=== Xamarin.Mac ===

Version: (Business Edition)

=== Build Information ===

Release ID: 504000240
Git revision: 01786bc67c7024ec33d327ed27e4416d7a846f4e
Build date: 2014-09-17 10:58:48-04
Xamarin addins: 7cd7dfcd6b7b7b53281508954ec080f1cd153ad3

=== Operating System ===

Mac OS X 10.9.4
Darwin ShrutiMac.local 13.3.0 Darwin Kernel Version 13.3.0
    Tue Jun  3 21:27:35 PDT 2014
    root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64
Comment 2 Sebastien Pouliot 2014-09-22 09:14:53 UTC
I'll verify the test case but it looks like a duplicate of #22893
Comment 3 Sebastien Pouliot 2014-09-22 09:19:22 UTC
It's identical. The issue is a bug in Mono (3.8) mcs compiler.

error MT2001: Could not link assemblies. Reason: Object reference not set to an instance of an object
--- inner exception
System.NullReferenceException: Object reference not set to an instance of an object
  at Mono.Cecil.Mixin.GetNestedType (Mono.Cecil.TypeDefinition self, System.String name) [0x00000] in <filename unknown>:0 
  at Mono.Cecil.TypeParser.TryGetDefinition (Mono.Cecil.ModuleDefinition module, Mono.Cecil.Type type_info, Mono.Cecil.TypeReference& type) [0x00000] in <filename unknown>:0 

A new 3.8.x should be soon available. 3.6 also works (if you want to go back) or 3.10 (alpha) already has the same fix.

*** This bug has been marked as a duplicate of bug 22893 ***