Bug 36209 - Build to device fails while it is working for simulator (System.NotSupportedException: Specified method is not supported.)
Summary: Build to device fails while it is working for simulator (System.NotSupportedE...
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: XI 9.1 (iOS 9.1)
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2015-11-24 10:42 UTC by asze
Modified: 2016-03-10 16:58 UTC (History)
4 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 asze 2015-11-24 10:42:44 UTC

I am getting this error only when I try to debug application on device (it is working when I debug application on simulator):

MTOUCH: error MT0000: Unexpected error - Please file a bug report at http://bugzilla.xamarin.com
		System.NotSupportedException: Specified method is not supported.
		  at Mono.Cecil.SignatureReader.ReadCustomAttributeNamedArgument (Mono.Collections.Generic.Collection`1& fields, Mono.Collections.Generic.Collection`1& properties) <0x109ee60e0 + 0x00153> in <filename unknown>:0 
		  at Mono.Cecil.SignatureReader.ReadCustomAttributeNamedArguments (UInt16 count, Mono.Collections.Generic.Collection`1& fields, Mono.Collections.Generic.Collection`1& properties) <0x109ee6060 + 0x00045> in <filename unknown>:0 
		  at Mono.Cecil.MetadataReader.ReadCustomAttributeSignature (Mono.Cecil.CustomAttribute attribute) <0x109ed78d0 + 0x0011c> in <filename unknown>:0 
		  at Mono.Cecil.CustomAttribute.<Resolve>m__1 (Mono.Cecil.CustomAttribute attribute, Mono.Cecil.MetadataReader reader) <0x109ed77a0 + 0x00036> in <filename unknown>:0 
		  at Mono.Cecil.ModuleDefinition.Read[TItem,TRet] (Mono.Cecil.TItem item, System.Func`3 read) <0x109eaa1b0 + 0x00076> in <filename unknown>:0 
		  at Mono.Cecil.CustomAttribute.Resolve () <0x109ed75d0 + 0x000ff> in <filename unknown>:0 
		  at Mono.Cecil.CustomAttribute.get_ConstructorArguments () <0x109ed7480 + 0x0001c> in <filename unknown>:0 
		  at Mono.Cecil.ImmediateModuleReader.ReadCustomAttributes (ICustomAttributeProvider provider) <0x109ed4060 + 0x0007c> in <filename unknown>:0 
		  at Mono.Cecil.ImmediateModuleReader.ReadProperties (Mono.Cecil.TypeDefinition type) <0x109edc320 + 0x000a0> in <filename unknown>:0 
		  at Mono.Cecil.ImmediateModuleReader.ReadType (Mono.Cecil.TypeDefinition type) <0x109ecfb90 + 0x00150> in <filename unknown>:0 
		  at Mono.Cecil.ImmediateModuleReader.ReadTypes (Mono.Collections.Generic.Collection`1 types) <0x109ecfb10 + 0x0003e> in <filename unknown>:0 
		  at Mono.Cecil.ImmediateModuleReader.ReadModule (Mono.Cecil.ModuleDefinition module) <0x109ec94b0 + 0x000cc> in <filename unknown>:0 
		  at Mono.Cecil.ModuleWriter.WriteModuleTo (Mono.Cecil.ModuleDefinition module, System.IO.Stream stream, Mono.Cecil.WriterParameters parameters) <0x109ec9120 + 0x00078> in <filename unknown>:0 
		  at Mono.Cecil.ModuleDefinition.Write (System.IO.Stream stream, Mono.Cecil.WriterParameters parameters) <0x109ec8fe0 + 0x0006f> in <filename unknown>:0 
		  at Mono.Cecil.ModuleDefinition.Write (System.String fileName, Mono.Cecil.WriterParameters parameters) <0x109ec8f30 + 0x00055> in <filename unknown>:0 
		  at Mono.Cecil.AssemblyDefinition.Write (System.String fileName, Mono.Cecil.WriterParameters parameters) <0x109ec8ee0 + 0x00035> in <filename unknown>:0 
		  at MTouch.SaveAssembly (Mono.Cecil.AssemblyDefinition assembly, System.String destination) <0x109ec8d20 + 0x00081> in <filename unknown>:0 
		  at MonoTouch.Assembly.RemoveResources (Boolean remove_resources, System.String target_directory, System.String nores_directory) <0x109ec47d0 + 0x0021a> in <filename unknown>:0 
		  at MonoTouch.Target.ProcessAssemblies () <0x109ec24e0 + 0x0044f> in <filename unknown>:0 
		  at MonoTouch.Application.BuildApp () <0x109ec1bb0 + 0x000af> in <filename unknown>:0 
		  at MonoTouch.Application.Build () <0x109e93710 + 0x000ee> in <filename unknown>:0 
		  at MTouch.Main2 (System.String[] args) <0x109338000 + 0x074bf> in <filename unknown>:0 
		  at MTouch.Main (System.String[] args) <0x107bbce60 + 0x00024> in <filename unknown>:0 
	Task "MTouch" execution -- FAILED

Version information: 
Xamarin Studio
Version 5.10 (build 871)
Installation UUID: ef263d27-30fc-4bf3-9111-222b542105ce
	Mono 4.2.1 (explicit/6dd2d0d)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 402010102

Not Installed

Apple Developer Tools
Xcode 7.1.1 (9081)
Build 7B1005

Not Installed

Version: (Starter Edition)
Android SDK: /Users/akop/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.3   (API level 10)
		4.0.3 (API level 15)
		4.4   (API level 19)
		5.1   (API level 22)
		6.0   (API level 23)

SDK Tools Version: 24.4
SDK Platform Tools Version: 23.0.1
SDK Build Tools Version: 21.1.2

Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

Xamarin Android Player
Version: 0.6.1
Location: /Applications/Xamarin Android Player.app

Version: (Business Edition)
Hash: 3c0ec35
Branch: master
Build date: 2015-11-12 13:05:39-0500

Build Information
Release ID: 510000871
Git revision: 4e9c5abb5ffdae12ba02ac49da83f8b2011dbb88
Build date: 2015-11-12 06:02:54-05
Xamarin addins: 55007ed0e56436f385d8e26394a45be563abc7e8
Build lane: monodevelop-lion-cycle6

Operating System
Mac OS X 10.10.5
Darwin Annas-Mac-mini.local 14.5.0 Darwin Kernel Version 14.5.0
    Tue Sep  1 21:23:09 PDT 2015
    root:xnu-2782.50.1~1/RELEASE_X86_64 x86_64
Comment 1 Rolf Bjarne Kvinge [MSFT] 2015-11-24 12:09:24 UTC
There is something in your app that breaks the build somehow.

Could you share your project with us so that we can reproduce this ourselves?
Comment 2 Sebastien Pouliot 2016-03-10 16:58:40 UTC
Please try again with XI 9.8 (alpha channel) and if it does not work please re-open and attach a test case so we can duplicate the issue. Thanks.