Bug 23602 - Unexpected error MT0000 on clean build
Summary: Unexpected error MT0000 on clean build
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: master
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: Untriaged
Assignee: Sebastien Pouliot
: 24889 ()
Depends on:
Reported: 2014-10-03 21:18 UTC by David Johnson
Modified: 2014-12-30 13:15 UTC (History)
8 users (show)

Is this bug a regression?: ---
Last known good build:

The build output (499.13 KB, application/octet-stream)
2014-10-03 21:18 UTC, David Johnson

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 David Johnson 2014-10-03 21:18:11 UTC
Created attachment 8307 [details]
The build output

I received this error when rebuilding my solution:

    error MT0000: Unexpected error - Please file a bug report at http://bugzilla.xamarin.com
    System.NullReferenceException: Object reference not set to an instance of an object
      at Xamarin.DRM.AssemblyVerifier.CheckResolvedAssemblyReferences (Mono.Cecil.AssemblyDefinition assembly, System.String file, LicenseType licenseLevel, System.Func`3 isXamarinSigned, System.Collections.Generic.List`1 exceptions) [0x00000] in <filename unknown>:0
      at Xamarin.DRM.AssemblyVerifier.CheckResolvedAssembly (Mono.Cecil.AssemblyDefinition assembly, System.String file, LicenseType licenseLevel, System.Func`3 isXamarinSigned, System.Collections.Generic.List`1 exceptions) [0x00000] in <filename unknown>:0
      at MonoTouch.Tuner.MonoTouchManifestResolver.Load (System.String file) [0x00000] in <filename unknown>:0 
      at MonoTouch.Target.Initialize (Boolean show_warnings) [0x00000] in <filename unknown>:0
      at MonoTouch.Application.Initialize () [0x00000] in <filename unknown>:0
      at MonoTouch.Application.Build () [0x00000] in <filename unknown>:0
      at MTouch.Main2 (System.String[] args) [0x00000] in <filename unknown>:0
      at MTouch.Main (System.String[] args) [0x00000] in <filename unknown>:0

The build output is attached. I am blocked until I can figure out how to solve this.
Comment 1 David Johnson 2014-10-03 21:27:08 UTC
Looks like the problem was a duplicate assembly reference, probably resulting from a git merge. (It's a shame you decided to use Visual Studio's approach of storing massive amounts of metadata about the project structure instead of just relying on the directory and file structure on disk, as IntelliJ and many other IDEs. Version control systems, especially git, don't deal well with merging XML, so I find myself frequently manually resolving conflicts.)

I am no longer blocked. It would have been nice to get a more meaningful error message.
Comment 2 Lluis Sanchez 2014-10-13 10:12:00 UTC
Unfortunately we need to use Visual Studio's approach since we need to keep compatibility.
Reassigning to iOS team since we should provide a more meaningful error message.
Comment 3 Sebastien Pouliot 2014-10-13 17:12:39 UTC
Fixed in master/c76398b79da14994993fb90af158aef598c3e2cf

Thanks for the logs. Some code was added before we reported the error (leading to an NRE if something was wrong with the assembly, e.g. file not found).
Comment 4 Rolf Bjarne Kvinge [MSFT] 2014-11-27 09:07:58 UTC
*** Bug 24889 has been marked as a duplicate of this bug. ***
Comment 5 Danish Akhtar 2014-11-28 11:58:44 UTC
I have tried to reproduce this issue with stable X.iOS builds and but unable to reproduce it.

I have followed the steps mentioned below.

1. Create an iOS application with starter license
2. Add name space using Mono.Data.Sqlite but didn't add sqlite library in reference.
3. Build the application.
4. Observed that it gives proper error message "type or namespace" not exists. Are you missing an assembly reference? its not giving NRE Exception.

Please confirm is this is correct steps to reproduce this issue or not? 

Please let me know if I am missing anything.

Comment 6 David Johnson 2014-11-28 12:17:48 UTC
What you did has nothing to do with the bug I reported. I don't know where you got those steps from. The error I reported was due to the project file having "duplicate" references to an assembly, not a missing reference.
Comment 7 Parmendra Kumar 2014-12-30 13:15:42 UTC

I have checked this issue but I am not able to reproduce this issue. Please check the screencast and let me know if I have missed anything. Could you please provide us steps so that we can reproduce this issue and verify it.

Screencast: http://www.screencast.com/t/Xjy9CxxcUTR

Environment info:

Xamarin Studio: 5.5.4 (build 15)
Xamarin.Android : (Business Edition)
Xcode 6.1 (6602)
Xamarin.iOS: (Business Edition)
Xamarin.Mac: (Business Edition)
Mac OS X 10.9.4