0

Two case in my build(xamarin.ios):

1) When build option setting:

Linker behavior: Link All

In that case application crash with this error message

You MUST invoke LoadApplication () before calling base.FinishedLaunching ()

2) When build option setting:

Linker behavior: Link Framework SDKs Only

I'm getting the error:

MT3001: Could not AOT the assembly.

/Users/macmini01/Desktop/Per/RunningCode_Both/XXX_Mobile Sourcecode_2Apr2018/XXX/XXX.iOS/MTOUCH: Error MT3001: Could not AOT the assembly '/Users/macmini01/Desktop/Per/RunningCode_Both/XXX_Mobile Sourcecode_2Apr2018/XXX/XXX.iOS/obj/iPhone/Debug/mtouch-cache/64/Build/OsmSharp.UI.dll' (MT3001) (XXX.iOS).

Stefan
  • 17,448
  • 11
  • 60
  • 79
shiv
  • 39
  • 8
  • Have you tried this [solution](https://forums.xamarin.com/discussion/457/error-could-not-aot-the-assembly-servicestack-text-monotouch-dll)? Also I find you have asked the same question [here](https://stackoverflow.com/questions/50100840/getting-the-error-mt3001-could-not-aot-the-assembly). Can you delete one? – Ax1le May 02 '18 at 07:50
  • Deleted @LandLu-MSFT – shiv May 02 '18 at 08:24

2 Answers2

0

Try following the Microsoft build steps:

Keeano
  • 309
  • 8
  • 33
  • Thanks @keeano /Users/macmini01/Desktop/Per/RunningCode_Both/xxxxx_Mobile Sourcecode_2Apr2018/xxxxx/xxxxx.iOS/MTOUCH: Error MT3001: Could not AOT the assembly '/Users/macmini01/Desktop/Per/RunningCode_Both/xxxxx_Mobile Sourcecode_2Apr2018/xxxxx/xxxxx.iOS/obj/iPhone/Debug/device-builds/iphone7.2-11.2/mtouch-cache/Build/OsmSharp.UI.dll' (MT3001) (xxxxx.iOS) – shiv May 01 '18 at 10:42
0

This was reported in https://github.com/xamarin/xamarin-macios/issues/4012.

2) The MT3001: Could not AOT the assembly was diagnosed here https://github.com/xamarin/xamarin-macios/issues/4012#issuecomment-386012378 to be related to an AOT compiler condition not met, leading to a crash, leading to no output from the AOT compiler, leading to the MT3001.

This was fixed in Mono 5.10 series https://github.com/mono/mono/issues/7637 which is included in our current alpha and beta builds, a.k.a 15.7 release or Xamarin.iOS 11.10.1.174+.

Vincent Dondain
  • 430
  • 3
  • 10