Bug 30625 - BTOUCH: error BI0000: Unexpected error - Please file a bug report at http://bugzilla.xamarin.com
Summary: BTOUCH: error BI0000: Unexpected error - Please file a bug report at http://b...
Status: RESOLVED ANSWERED
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: master
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-05-31 16:11 UTC by Maria
Modified: 2015-06-01 04:13 UTC (History)
2 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 ANSWERED

Description Maria 2015-05-31 16:11:31 UTC
version of Xamarin 5.8.3.(version 1)

I am trying to build a binding project for Xcode library.
Automatically monotouch.dll library was added to the References and it was no problems to build a project.
After I changed monotouch.dll to Xamarin.Ios.dll i got this problem while binding: 

Build started 5/31/2015 11:08:49 PM.
__________________________________________________
Project "/Users/admin/Projects/PlugPDF/PlugPdfBinding/PlugPdfBinding/PlugPdfBinding.csproj" (Build target(s)):
	
	Target PrepareForBuild:
		Configuration: Debug Platform: AnyCPU
	
	Target GenerateSatelliteAssemblies:
	No input files were specified for target GenerateSatelliteAssemblies, skipping.
	
	Target GenerateBindings:
		Tool /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/btouch execution started with arguments: /v /baselib:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/monotouch.dll /unsafe /d:DEBUG ApiDefinition.cs /s:StructsAndEnums.cs -r /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/System.dll -r ../../../../../../Library/Frameworks/Xamarin.iOS.framework/Versions/8.9.1.3/lib/mono/Xamarin.iOS/Xamarin.iOS.dll -r /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/System.Core.dll -r /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/mscorlib.dll -r ../../../../../../Library/Frameworks/Xamarin.iOS.framework/Versions/8.9.1.3/lib/mono/Xamarin.iOS/Xamarin.iOS.dll -r /Library/Frameworks/Xamarin.iOS.framework/Versions/8.9.1.3/lib/mono/Xamarin.iOS/System.Xml.dll /tmpdir:obj/Debug/ios/ /sourceonly:obj/Debug/ios//sources.list 
		/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/smcs  -debug -unsafe -target:library -nowarn:436 -out:'obj/Debug/ios/temp.dll' -r:'/Library/Frameworks/Xamarin.iOS.framework/Versions/8.9.1.3/lib/btouch/btouch.exe' -r:'/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/System.dll' -r:'../../../../../../Library/Frameworks/Xamarin.iOS.framework/Versions/8.9.1.3/lib/mono/Xamarin.iOS/Xamarin.iOS.dll' -r:'/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/System.Core.dll' -r:'/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/mscorlib.dll' -r:'../../../../../../Library/Frameworks/Xamarin.iOS.framework/Versions/8.9.1.3/lib/mono/Xamarin.iOS/Xamarin.iOS.dll' -r:'/Library/Frameworks/Xamarin.iOS.framework/Versions/8.9.1.3/lib/mono/Xamarin.iOS/System.Xml.dll' -unsafe -r:'/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/monotouch.dll' -define:DEBUG   'ApiDefinition.cs' 'StructsAndEnums.cs'
BTOUCH: error BI0000: Unexpected error - Please file a bug report at http://bugzilla.xamarin.com
		System.TypeLoadException: Could not load type UIKit.UIView, Xamarin.iOS, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065 while decoding custom attribute
		  at (wrapper managed-to-native) System.MonoCustomAttrs:GetCustomAttributesInternal (System.Reflection.ICustomAttributeProvider,System.Type,bool)
		  at System.MonoCustomAttrs.GetCustomAttributesBase (ICustomAttributeProvider obj, System.Type attributeType, Boolean inheritedOnly) [0x00019] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System/MonoCustomAttrs.cs:103 
		  at System.MonoCustomAttrs.GetCustomAttributes (ICustomAttributeProvider obj, System.Type attributeType, Boolean inherit) [0x00040] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System/MonoCustomAttrs.cs:152 
		  at System.MonoType.GetCustomAttributes (System.Type attributeType, Boolean inherit) [0x00017] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System/MonoType.cs:589 
		  at BindingTouch.Main2 (System.String[] args) [0x0093a] in /Developer/MonoTouch/Source/maccore/src/btouch.cs:327 
		  at BindingTouch.Main (System.String[] args) [0x0001d] in /Developer/MonoTouch/Source/maccore/src/btouch.cs:89 
	Task "BTouch" execution -- FAILED
	Done building target "GenerateBindings" in project "/Users/admin/Projects/PlugPDF/PlugPdfBinding/PlugPdfBinding/PlugPdfBinding.csproj".-- FAILED
	
Done building project "/Users/admin/Projects/PlugPDF/PlugPdfBinding/PlugPdfBinding/PlugPdfBinding.csproj".-- FAILED

Build FAILED.
Errors:

/Users/admin/Projects/PlugPDF/PlugPdfBinding/PlugPdfBinding/PlugPdfBinding.csproj (Build) ->
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Xamarin.ObjcBinding.CSharp.targets (GenerateBindings target) ->

	BTOUCH: error BI0000: Unexpected error - Please file a bug report at http://bugzilla.xamarin.com


_____________________________________________________________________________________  
this is my ApiDefinition file :

using System;
using CoreGraphics;
using UIKit;
using Foundation;


namespace PlugPdfBinding
{
    [BaseType (typeof (UIView))]
    public partial interface PlugPDFDocumentView {

        [Export ("initWithFrame:path:password:")]
        IntPtr Constructor (CGRect frame, string path, string password);

        [Export ("setContentWithFrame:")]
        void SetContentWithFrame(CGRect frame);

    }


}
Comment 1 Rolf Bjarne Kvinge [MSFT] 2015-06-01 04:13:03 UTC
Do not change the reference from monotouch.dll to Xamarin.iOS.dll, that will not accomplish what you want.

Instead use the menu Project -> "Migrate to Xamarin.iOS Unified API" in Xamarin Studio, which will convert your project properly.