Bug 59593 - Failed to compile the generated registrar code. Please file a bug report at http://bugzilla.xamarin.com - Visual Studio 2017 15.3.5
Summary: Failed to compile the generated registrar code. Please file a bug report at h...
Status: RESOLVED ANSWERED
Alias: None
Product: iOS
Classification: Xamarin
Component: Tools ()
Version: XI 11.0 (xcode9)
Hardware: PC Windows
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-09-20 02:09 UTC by Milton Z.
Modified: 2017-10-10 14:46 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 ANSWERED

Description Milton Z. 2017-09-20 02:09:20 UTC
I updated my visual studio installation and the Xamarin.ios on my mac mini (MacOS Sierra) to 11.0 
Errors on compilation of previously working code.

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++  -Wno-receiver-forward-class -gdwarf-2 -I/Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/SDKs/MonoTouch.iphoneos.sdk/usr/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk -Qunused-arguments -miphoneos-version-min=8.0 -arch armv7 -c -o /Users/miltonzurita/Library/Caches/Xamarin/mtbs/builds/---.Mobile.iOS/f9bcae1ae06a29f3d74fe041eda288cd/obj/iPhone/Debug/device-builds/iphone5.2-10.3.3/mtouch-cache/armv7/registrar.o -x objective-c++ -DDEBUG /Users/miltonzurita/Library/Caches/Xamarin/mtbs/builds/---.Mobile.iOS/f9bcae1ae06a29f3d74fe041eda288cd/obj/iPhone/Debug/device-builds/iphone5.2-10.3.3/mtouch-cache/registrar.m
1>  /Users/miltonzurita/Library/Caches/Xamarin/mtbs/builds/---.Mobile.iOS/f9bcae1ae06a29f3d74fe041eda288cd/obj/iPhone/Debug/device-builds/iphone5.2-10.3.3/mtouch-cache/registrar.m:2944:8: error: unknown type name 'MKClusterAnnotation'; did you mean 'MKPointAnnotation'?
1>  static MKClusterAnnotation * native_to_managed_trampoline_61 (id self, SEL _cmd, MonoMethod **managed_method_ptr, MKMapView * p0, NSArray * p1, uint32_t token_ref)
1>         ^~~~~~~~~~~~~~~~~~~
1>         MKPointAnnotation
1>  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/MapKit.framework/Headers/MKPointAnnotation.h:16:12: note: 'MKPointAnnotation' declared here
1>  @interface MKPointAnnotation : MKShape
1>             ^ 
1>  /Users/miltonzurita/Library/Caches/Xamarin/mtbs/builds/---.Mobile.iOS/f9bcae1ae06a29f3d74fe041eda288cd/obj/iPhone/Debug/device-builds/iphone5.2-10.3.3/mtouch-cache/registrar.m:2952:2: error: unknown type name 'MKClusterAnnotation'; did you mean 'MKPointAnnotation'?
1>          MKClusterAnnotation * res = {0};
1>          ^~~~~~~~~~~~~~~~~~~
1>          MKPointAnnotation
1>  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/MapKit.framework/Headers/MKPointAnnotation.h:16:12: note: 'MKPointAnnotation' declared here
1>  @interface MKPointAnnotation : MKShape
1>             ^ 
1>  /Users/miltonzurita/Library/Caches/Xamarin/mtbs/builds/---.Mobile.iOS/f9bcae1ae06a29f3d74fe041eda288cd/obj/iPhone/Debug/device-builds/iphone5.2-10.3.3/mtouch-cache/registrar.m:10315:4: error: expected a type
1>          -(MKClusterAnnotation *) mapView:(MKMapView *)p0 clusterAnnotationForMemberAnnotations:(NSArray *)p1;
1>            ^ 
1>  /Users/miltonzurita/Library/Caches/Xamarin/mtbs/builds/---.Mobile.iOS/f9bcae1ae06a29f3d74fe041eda288cd/obj/iPhone/Debug/device-builds/iphone5.2-10.3.3/mtouch-cache/registrar.m:10377:4: error: expected a type
1>          -(MKClusterAnnotation *) mapView:(MKMapView *)p0 clusterAnnotationForMemberAnnotations:(NSArray *)p1
1>            ^ 
1>  /Users/miltonzurita/Library/Caches/Xamarin/mtbs/builds/---.Mobile.iOS/f9bcae1ae06a29f3d74fe041eda288cd/obj/iPhone/Debug/device-builds/iphone5.2-10.3.3/mtouch-cache/registrar.m:11984:2: warning: method possibly missing a [super awakeFromNib] call [-Wobjc-missing-super-calls]
1>          } 
1>          ^ 
1>  /Users/miltonzurita/Library/Caches/Xamarin/mtbs/builds/---.Mobile.iOS/f9bcae1ae06a29f3d74fe041eda288cd/obj/iPhone/Debug/device-builds/iphone5.2-10.3.3/mtouch-cache/registrar.m:12092:2: warning: method possibly missing a [super awakeFromNib] call [-Wobjc-missing-super-calls]
1>          } 
1>          ^ 
1>  2 warnings and 4 errors generated.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(748,3): error : Failed to compile the generated registrar code. Please file a bug report at http://bugzilla.xamarin.com
Comment 1 Sebastien Pouliot 2017-09-20 02:46:04 UTC
This can happen in some projects, it's the MT4109 error mentioned in the release notes [1].

This is why the notes mention that Xamarin.iOS 11.0 requires Xcode 9 and it's SDK. 

It's not strictly true (it works in some cases) and there are some possible workarounds, but they are not optimal. E.g. since header files will not be available, application performance can suffer since what's can be done at build time needs to be done at startup.

The easiest solution is to update your Mac to use Xcode 9.

[1] https://developer.xamarin.com/releases/ios/xamarin.ios_11/xamarin.ios_11.0/#Requirements
Comment 2 Milton Z. 2017-09-20 02:53:27 UTC
Ok.  Thanks a lot.  I didn't get those release notes, I just got an update alert and was hoping other issues were fixed.  Thanks for your help.