Bug 59549 - Error on running ios app with visual studio 2017 and xcode9
Summary: Error on running ios app with visual studio 2017 and xcode9
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: XI 11.0 (xcode9)
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2017-09-18 10:06 UTC by Nishant.ranjan
Modified: 2017-11-17 11:48 UTC (History)
12 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 Nishant.ranjan 2017-09-18 10:06:15 UTC
I am getting the below error on running ios application in xamarin

Failed to compile the generated registrar code (MT4109)

Error on running ios app on visual studio 2017 with xcode9
Comment 1 Pierce Boggan [MSFT] 2017-09-18 16:12:49 UTC
Hey Nishant,

Could you please upload your Xamarin logs? These are found by going to Help -> Xamarin -> Logs -> Zip Xamarin Logs.

Additionally, if you could upload your full build log (found in the "Build" window) and a project that reproduces this issue, that would be great!
Comment 2 William 2017-09-21 08:13:08 UTC
Got the same error on visual studio for Mac with xcode 9
Comment 3 William 2017-09-21 08:37:31 UTC
After a restart the error disappeared
Comment 4 bogdangm 2017-09-22 12:02:20 UTC

I've got the same error when building iOS project.

localPath/FrontMobile.Launcher.iOS/FrontMobile.Launcher.iOS.csproj (Build) ->
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets (_CompileToNative target) ->
MTOUCH: error MT4109: Failed to compile the generated registrar code. Please file a bug report at http://bugzilla.xamarin.com


Xamarin Studio Community
Version 6.3 (build 863)
Installation UUID: 175bcaff-bce4-49e3-95d0-47495074fd97
	Mono (d15-3/14f2c81) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 502000224


Version: 1.4.0
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

Apple Developer Tools
Xcode 9.0 (13247)
Build 9A235

Xamarin Inspector
Not Installed

Version: (Xamarin Studio Community)
Hash: 80b8487d
Branch: d15-3
Build date: 2017-08-18 16:07:26-0400

Version: (Xamarin Studio Community)
Android SDK: /Users/ailic/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		6.0 (API level 23)

SDK Tools Version: 25.1.2
SDK Platform Tools Version: 24.0.0
SDK Build Tools Version: 23.0.2

Java SDK: /usr
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

Android Designer EPL code available here:

Xamarin.Mac not installed. Can't find /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/Version.

Build Information
Release ID: 603000863
Git revision: a2163670efe259c85cd8f335d95b175068fbbe2a
Build date: 2017-04-03 14:33:15-04
Xamarin addins: 2045d688ea1420e0381b473360ca62a763eb7d04
Build lane: monodevelop-lion-d15-1

Operating System
Mac OS X 10.12.6
Darwin efront-5-00237.frontlabs.com 16.7.0 Darwin Kernel Version 16.7.0
    Thu Jun 15 17:36:27 PDT 2017
    root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64

Can you please let me know if you go any ideas on fix/workaround ?
Comment 5 Pierce Boggan [MSFT] 2017-09-22 17:47:42 UTC
Moving back to NEW for the team to take a look. :)
Comment 6 Emanuel 2017-09-22 18:08:59 UTC
Moved to the iOS team since it seems to be reproducible from both VS and VSfM.
Comment 7 Sebastien Pouliot 2017-09-22 18:14:37 UTC
> Version: (Xamarin Studio Community)

Using Xcode 9 requires XI 11.0 or later [1], which includes support for the new simulators, devices and API.

XI 11.0 is available now in the stable channel.

[1] https://developer.xamarin.com/releases/ios/xamarin.ios_11/xamarin.ios_11.0/#Requirements
Comment 8 Alex Soto [MSFT] 2017-09-22 19:35:32 UTC
> Xamarin Studio Community
> Version 6.3 (build 863)

Also @Nishant, I highly encourage to use Visual Studio For Mac or higher instead for Xamarin Studio at this point.
Comment 9 bogdangm 2017-09-25 09:36:26 UTC

After I upgraded Xamarini.iOS to 11.0, the following error disappeared, but now I am unable to start simulator. Solution is building successfully, but when tried to run tests, the following error is occurring:

SetUp : Calabash.XDB.Core.Exceptions.DeviceAgentException : Failed to launch simulator

ExitCode: 134

*** First throw call stack:
2017-09-25 11:03:39.454 iOSDeviceManager[2393:121709] *** Assertion failure in +[FBSimulatorControlFrameworkLoader loadPrivateFrameworksOrAbort], /Users/moody/git/calabash/FBSimulatorControl/FBControlCore/Utility/FBControlCoreFrameworkLoader.m:41
2017-09-25 11:03:39.457 iOSDeviceManager[2393:121709] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Failed to private frameworks for FBSimulatorControl with error Error Domain=com.facebook.FBControlCore Code=0 "Attempting to load a file at path '/Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework', but it does not exist" UserInfo={NSLocalizedDescription=Attempting to load a file at path '/Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework', but it does not exist}'
libc++abi.dylib: terminating with uncaught exception of type NSException

It seems that whole CoreSimulator.framework is missing ?! Any ideas how can this be fixed?

Comment 10 bogdangm 2017-09-26 19:43:46 UTC

Is there any update on the last question/comment ?

Comment 11 Graham Hickson 2017-11-16 10:57:16 UTC
Im also wondering if this has been resolved as Im experiencing the FBSimulatorConttrolFameworkLoader issue in Visual Studio for Mac
Comment 12 bogdangm 2017-11-17 11:39:07 UTC
I believe, In the end, you just need to update your xCode version, and all the Xamarin.iOS, Xamarin.Android and Xamarin for Mac versions(or in your case VS for MAC), as well as Mono. 

Hope it helps.
Comment 13 Graham Hickson 2017-11-17 11:48:43 UTC
Thanks bogdan,

Turned out my issues were caused by a version mismatch.