Bug 35165 - Build for device (AdHoc) throws MTOUCH: error MT0000: Unexpected error
Summary: Build for device (AdHoc) throws MTOUCH: error MT0000: Unexpected error
Status: RESOLVED NORESPONSE
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: XI 9.1 (iOS 9.1)
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-10-22 09:57 UTC by Michał Mazur
Modified: 2016-04-12 20:04 UTC (History)
3 users (show)

Tags:
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:
Status:
RESOLVED NORESPONSE

Description Michał Mazur 2015-10-22 09:57:43 UTC
The error is thrown except when building with Debug|iPhoneSimulator configuration.
It works (build succeeds) with Xamarin.iOS 9.0.1.18 and XS 5.9.7.

Xamarin Studio 5.10.0
Xamarin.iOS 9.2.0.84


MTOUCH: error MT0000: Unexpected error - Please file a bug report at http://bugzilla.xamarin.com
		System.NotSupportedException: Operation is not supported.
		  at Mono.Cecil.SignatureReader.ReadCustomAttributeNamedArgument (Mono.Collections.Generic.Collection`1& fields, Mono.Collections.Generic.Collection`1& properties) [0x00000] in <filename unknown>:0 
		  at Mono.Cecil.SignatureReader.ReadCustomAttributeNamedArguments (UInt16 count, Mono.Collections.Generic.Collection`1& fields, Mono.Collections.Generic.Collection`1& properties) [0x00000] in <filename unknown>:0 
		  at Mono.Cecil.MetadataReader.ReadCustomAttributeSignature (Mono.Cecil.CustomAttribute attribute) [0x00000] in <filename unknown>:0 
		  at Mono.Cecil.CustomAttribute.<Resolve>m__1 (Mono.Cecil.CustomAttribute attribute, Mono.Cecil.MetadataReader reader) [0x00000] in <filename unknown>:0 
		  at Mono.Cecil.ModuleDefinition.Read[CustomAttribute,CustomAttribute] (Mono.Cecil.CustomAttribute item, System.Func`3 read) [0x00000] in <filename unknown>:0 
		  at Mono.Cecil.CustomAttribute.Resolve () [0x00000] in <filename unknown>:0 
		  at Mono.Cecil.CustomAttribute.get_ConstructorArguments () [0x00000] in <filename unknown>:0 
		  at Mono.Cecil.ImmediateModuleReader.ReadCustomAttributes (ICustomAttributeProvider provider) [0x00000] in <filename unknown>:0 
		  at Mono.Cecil.ImmediateModuleReader.ReadProperties (Mono.Cecil.TypeDefinition type) [0x00000] in <filename unknown>:0 
		  at Mono.Cecil.ImmediateModuleReader.ReadType (Mono.Cecil.TypeDefinition type) [0x00000] in <filename unknown>:0 
		  at Mono.Cecil.ImmediateModuleReader.ReadTypes (Mono.Collections.Generic.Collection`1 types) [0x00000] in <filename unknown>:0 
		  at Mono.Cecil.ImmediateModuleReader.ReadModule (Mono.Cecil.ModuleDefinition module) [0x00000] in <filename unknown>:0 
		  at Mono.Cecil.ModuleWriter.WriteModuleTo (Mono.Cecil.ModuleDefinition module, System.IO.Stream stream, Mono.Cecil.WriterParameters parameters) [0x00000] in <filename unknown>:0 
		  at Mono.Cecil.ModuleDefinition.Write (System.IO.Stream stream, Mono.Cecil.WriterParameters parameters) [0x00000] in <filename unknown>:0 
		  at Mono.Cecil.ModuleDefinition.Write (System.String fileName, Mono.Cecil.WriterParameters parameters) [0x00000] in <filename unknown>:0 
		  at Mono.Cecil.AssemblyDefinition.Write (System.String fileName, Mono.Cecil.WriterParameters parameters) [0x00000] in <filename unknown>:0 
		  at MTouch.SaveAssembly (Mono.Cecil.AssemblyDefinition assembly, System.String destination) [0x00000] in <filename unknown>:0 
		  at MonoTouch.Assembly.RemoveResources (Boolean remove_resources, System.String target_directory, System.String nores_directory) [0x00000] in <filename unknown>:0 
		  at MonoTouch.Target.ProcessAssemblies () [0x00000] in <filename unknown>:0 
		  at MonoTouch.Application.BuildApp () [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
Comment 1 Rolf Bjarne Kvinge [MSFT] 2015-10-22 10:02:10 UTC
@Michał, can you share your project with us so that we can reproduce this?
Comment 2 Michał Mazur 2015-10-23 04:09:41 UTC
Unfortunately no.

I'll try to reproduce a bug and send a project as soon as possible.
Comment 3 Sebastien Pouliot 2015-10-24 12:52:54 UTC
If you use XS to switch between the stable/beta/alpha channels then it's possible you're also switching the mono version being used. This is were the C# compiler comes from.

Can you attach all* version information when your project works ? and also when it does not works ?

Also, if you were using a different mono (in both cases) then you might want to try to use only the working one to see if it's related to the compiler (XS updates everything by default but you can uncheck some components).

* The easiest way to get exact version information is to use the "Xamarin Studio" menu, "About Xamarin Studio" item, "Show Details" button and copy/paste the version informations (you can use the "Copy Information" button).
Comment 4 Michał Mazur 2015-10-26 04:57:24 UTC
Does not work using:
Xamarin Studio
Version 5.9.7 (build 22)
Installation UUID: fbc79189-f006-4aaa-87aa-82dcae5454e1
Runtime:
	Mono 4.0.4 ((detached/d481017)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400040004

Apple Developer Tools
Xcode 7.0 (8227)
Build 7A220

Xamarin.iOS
Version: 9.0.1.29 (Trial Edition)
Hash: 1d27ac2
Branch: master
Build date: 2015-09-25 18:08:44-0400

Works with:

Xamarin Studio
Version 5.9.7 (build 22)
Installation UUID: fbc79189-f006-4aaa-87aa-82dcae5454e1
Runtime:
	Mono 4.0.4 ((detached/d481017)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400040004

Apple Developer Tools
Xcode 7.0 (8227)
Build 7A220

Xamarin.iOS
Version: 9.0.1.18 (Trial Edition)
Hash: d230615
Branch: master
Build date: 2015-09-16 17:04:13-0400

The only difference is Xamarin.iOS. MT0000 error pops up with all versions after 9.0.1.18.
Comment 5 Sebastien Pouliot 2016-04-12 20:04:42 UTC
We have not received further information and will assume this is not an issue anymore. If you can still affected by this please re-open the bug and include the requested information. Thanks.