Share via

What does this mean and how to fix it: Xamarin.iOS: Unable to locate assembly 'Xamarin.Forms.Platform.iOS' (culture: '')

WillAutioItrax 211 Reputation points
2021-05-27T15:57:11.203+00:00

I noticed the following in the build output:

2021-05-27 08:35:57.088 Xamarin.PreBuilt.iOS[674:187068] Xamarin.iOS: Unable to locate assembly 'Xamarin.Forms.Platform.iOS' (culture: '')
2021-05-27 08:35:57.089 Xamarin.PreBuilt.iOS[674:187068] Xamarin.iOS: Unable to locate assembly 'Xamarin.Forms.Core' (culture: '')
2021-05-27 08:35:57.302 Xamarin.PreBuilt.iOS[674:187068] Xamarin.iOS: Unable to locate assembly 'Microsoft.Bcl.AsyncInterfaces' (culture: '')
2021-05-27 08:35:57.342 Xamarin.PreBuilt.iOS[674:187068] Xamarin.iOS: Unable to locate assembly 'Microsoft.Azure.Storage.Common' (culture: '')

and many more similar to these.
The messages point to an issue with stuff that is not my code. How can I fix this? Do I need to fix it?
Thanks!

Developer technologies | .NET | Xamarin

4 answers

Sort by: Most helpful
  1. Pascal Pereira 36 Reputation points
    2021-06-18T16:27:32.79+00:00

    I'm also facing this issue... connected iPhone to Windows through USB... tried to debug to the device... app seems like it gets installed BUT gets the default Xamarin logo instead... get the prompt to start the app... when I do.. the following:

    2021-06-18 12:10:08.220 Xamarin.PreBuilt.iOS[32774:15270789] Xamarin.iOS: Successfully received USB connection from the IDE on port 10000, fd: 6

    2021-06-18 12:10:08.223 Xamarin.PreBuilt.iOS[32774:15270789] Xamarin.iOS: Processing: 'start profiler: no'

    2021-06-18 12:10:08.224 Xamarin.PreBuilt.iOS[32774:15270763] Xamarin.iOS: Profiler not loaded (disabled)

    Loaded assembly: /private/var/containers/Bundle/Application/94CFD09A-338D-45A7-905B-6CAD2AD913B9/SOSMobile.iOS.app/Xamarin.iOS.dll [External]
    Loaded assembly: /private/var/containers/Bundle/Application/94CFD09A-338D-45A7-905B-6CAD2AD913B9/SOSMobile.iOS.app/System.dll [External]
    Loaded assembly: /private/var/containers/Bundle/Application/94CFD09A-338D-45A7-905B-6CAD2AD913B9/SOSMobile.iOS.app/Mono.Security.dll [External]
    Loaded assembly: /private/var/containers/Bundle/Application/94CFD09A-338D-45A7-905B-6CAD2AD913B9/SOSMobile.iOS.app/Xamarin.PreBuilt.iOS.exe [External]
    Thread started: #2
    Loaded assembly: /private/var/containers/Bundle/Application/94CFD09A-338D-45A7-905B-6CAD2AD913B9/SOSMobile.iOS.app/Xamarin.PreBuilt.iOS.Library.dll [External]
    Loaded assembly: /private/var/containers/Bundle/Application/94CFD09A-338D-45A7-905B-6CAD2AD913B9/SOSMobile.iOS.app/netstandard.dll [External]
    Loaded assembly: /private/var/containers/Bundle/Application/94CFD09A-338D-45A7-905B-6CAD2AD913B9/SOSMobile.iOS.app/System.Core.dll [External]
    2021-06-18 12:10:08.477 Xamarin.PreBuilt.iOS[32774:15270763] Content folder: /var/mobile/Containers/Data/Application/29108580-02E2-4178-87F3-D428346A48D8/Documents/SOSMobile.iOS.content

    Thread started: #3
    Thread started: <Thread Pool> #4
    Thread started: <Thread Pool> #5
    Thread started: <Thread Pool> #6
    Thread started: <Thread Pool> #7
    2021-06-18 12:10:09.173 Xamarin.PreBuilt.iOS[32774:15270763] Forms app path /var/mobile/Containers/Data/Application/29108580-02E2-4178-87F3-D428346A48D8/Documents/SOSMobile.iOS.content/SOSMobile.iOS.exe

    2021-06-18 12:10:09.174 Xamarin.PreBuilt.iOS[32774:15270763] Xamarin.iOS: Unable to locate assembly 'Xamarin.Forms.Platform.iOS' (culture: '')
    2021-06-18 12:10:09.174 Xamarin.PreBuilt.iOS[32774:15270763] Xamarin.iOS: Unable to locate assembly 'Xamarin.Forms.Platform.iOS' (culture: '')

    2021-06-18 12:10:09.175 Xamarin.PreBuilt.iOS[32774:15270763] Xamarin.iOS: Unable to locate assembly 'SOSMobile' (culture: '')
    2021-06-18 12:10:09.175 Xamarin.PreBuilt.iOS[32774:15270763] Xamarin.iOS: Unable to locate assembly 'SOSMobile' (culture: '')

    2021-06-18 12:10:09.176 Xamarin.PreBuilt.iOS[32774:15270763] Xamarin.iOS: Unable to locate assembly 'Xamarin.Forms.Core' (culture: '')
    2021-06-18 12:10:09.176 Xamarin.PreBuilt.iOS[32774:15270763] Xamarin.iOS: Unable to locate assembly 'Xamarin.Forms.Core' (culture: '')

    Loaded assembly: /private/var/mobile/Containers/Data/Application/29108580-02E2-4178-87F3-D428346A48D8/Documents/SOSMobile.iOS.content/SOSMobile.iOS.exe
    Loaded assembly: /private/var/mobile/Containers/Data/Application/29108580-02E2-4178-87F3-D428346A48D8/Documents/SOSMobile.iOS.content/Xamarin.Forms.Platform.iOS.dll [External]
    Loaded assembly: /private/var/mobile/Containers/Data/Application/29108580-02E2-4178-87F3-D428346A48D8/Documents/SOSMobile.iOS.content/SOSMobile.dll
    Loaded assembly: /private/var/mobile/Containers/Data/Application/29108580-02E2-4178-87F3-D428346A48D8/Documents/SOSMobile.iOS.content/Xamarin.Forms.Core.dll [External]
    2021-06-18 12:10:09.192 Xamarin.PreBuilt.iOS[32774:15270763] Xamarin.Forms AppDelegate name: AppDelegate

    =================================================================

    Native Crash Reporting

    Got a segv while executing native code. This usually indicates
    a fatal error in the mono runtime or one of the native libraries

    used by your application.

    =================================================================

    Native stacktrace:

    0x1022d8120 - /private/var/containers/Bundle/Application/94CFD09A-338D-45A7-905B-6CAD2AD913B9/SOSMobile.iOS.app/Xamarin.PreBuilt.iOS : mono_dump_native_crash_info
    0x1022cecbc - /private/var/containers/Bundle/Application/94CFD09A-338D-45A7-905B-6CAD2AD913B9/SOSMobile.iOS.app/Xamarin.PreBuilt.iOS : mono_handle_native_crash

    0x1022dba60 - /private/var/containers/Bundle/Application/94CFD09A-338D-45A7-905B-6CAD2AD913B9/SOSMobile.iOS.app/Xamarin.PreBuilt.iOS : mono_sigsegv_signal_handler_debug
    0x1dde93298 - /usr/lib/system/libsystem_platform.dylib : <redacted>

    0x1a739421c - /usr/lib/libobjc.A.dylib : <redacted>
    0x191fb5830 - /usr/lib/system/libdyld.dylib : <redacted>
    0x191fa717c - /usr/lib/system/libdyld.dylib : <redacted>

    0x191fb6334 - /usr/lib/system/libdyld.dylib : <redacted>
    0x191fb5e1c - /usr/lib/system/libdyld.dylib : <redacted>
    0x191fb7d04 - /usr/lib/system/libdyld.dylib : <redacted>
    0x191fa9d34 - /usr/lib/system/libdyld.dylib : <redacted>

    0x102484970 - /private/var/containers/Bundle/Application/94CFD09A-338D-45A7-905B-6CAD2AD913B9/SOSMobile.iOS.app/Xamarin.PreBuilt.iOS : do_icall
    0x102483010 - /private/var/containers/Bundle/Application/94CFD09A-338D-45A7-905B-6CAD2AD913B9/SOSMobile.iOS.app/Xamarin.PreBuilt.iOS : do_icall_wrapper
    0x102479a8c - /private/var/containers/Bundle/Application/94CFD09A-338D-45A7-905B-6CAD2AD913B9/SOSMobile.iOS.app/Xamarin.PreBuilt.iOS : interp_exec_method_full

    0x102477eb0 - /private/var/containers/Bundle/Application/94CFD09A-338D-45A7-905B-6CAD2AD913B9/SOSMobile.iOS.app/Xamarin.PreBuilt.iOS : interp_runtime_invoke
    0x1022ded3c - /private/var/containers/Bundle/Application/94CFD09A-338D-45A7-905B-6CAD2AD913B9/SOSMobile.iOS.app/Xamarin.PreBuilt.iOS : mono_jit_runtime_invoke
    0x10238d2c0 - /private/var/containers/Bundle/Application/94CFD09A-338D-45A7-905B-6CAD2AD913B9/SOSMobile.iOS.app/Xamarin.PreBuilt.iOS : mono_runtime_invoke_checked
    0x102392564 - /private/var/containers/Bundle/Application/94CFD09A-338D-45A7-905B-6CAD2AD913B9/SOSMobile.iOS.app/Xamarin.PreBuilt.iOS : mono_runtime_exec_main_checked

    0x1022c38f4 - /private/var/containers/Bundle/Application/94CFD09A-338D-45A7-905B-6CAD2AD913B9/SOSMobile.iOS.app/Xamarin.PreBuilt.iOS : mono_jit_exec

    0x102475984 - /private/var/containers/Bundle/Application/94CFD09A-338D-45A7-905B-6CAD2AD913B9/SOSMobile.iOS.app/Xamarin.PreBuilt.iOS : xamarin_main

    0x10228bc34 - /private/var/containers/Bundle/Application/94CFD09A-338D-45A7-905B-6CAD2AD913B9/SOSMobile.iOS.app/Xamarin.PreBuilt.iOS : main
    0x191fa56b0 - /usr/lib/system/libdyld.dylib : <redacted>

    =================================================================

    Basic Fault Address Reporting

    Memory around native instruction pointer (0x10b4c1218):0x10b4c1208 00 0c 40 fd c0 03 5f d6 00 0c 00 fd c0 03
    5f d6 ..@...........
    0x10b4c1218 f4 4f be a9 fd 7b 01 a9 fd 43 00 91 1f 20 03 d5
    .O...{...C... ..
    0x10b4c1228 c8 70 01 58 00 01 40 fd 1f 20 03 d5 21 64 01 5c .p.X..@.. ..!d.\
    0x10b4c1238 00 20 61 1e 65 02 00 54 40 52
    01 10 1f 20 03 d5 . a.e..T@R... ..

    =================================================================

    Managed Stacktrace:

    at <unknown> <0xffffffff>
    at ObjCRuntime.Dlfcn:_dlopen <0x00026>
    at ObjCRuntime.Dlfcn:dlopen <0x00010>
    at Xamarin.PreBuilt.iOS.Applications:LoadFrameworks <0x0009e>
    at Xamarin.PreBuilt.iOS.Applications:Main <0x00202>

    at <Module>:runtime_invoke_direct_void_string[] <0x00092>

    The app has been terminated.

    1 person found this answer helpful.
    0 comments No comments

  2. sunco 121 Reputation points
    2021-12-01T20:57:31.957+00:00

    I have this issue too. Couple of weeks ago the project was working fine. For some reason I need to pause it. Then two weeks later when reopen, it fails when run on a physical iOS device

    Already clean the project, rebuild, close VS, and still the problem

    The only thing that changes on my pc was the KB5007262 and KB5007292

    I'm using VS 2022 Community 17.0.1
    .Net is 4.8.04161
    Windows 11 22000.348
    iOS is 15.0.2 - iPhone

    Edit:

    Uninstalling those KB and still the same. This is the log

    =================================================================

    Native Crash Reporting

    Got a segv while executing native code. This usually indicates
    a fatal error in the mono runtime or one of the native libraries

    used by your application.

    =================================================================

    Native stacktrace:

    0x1025c41e0 - /private/var/containers/Bundle/Application/_SOME_GUID_/MyApp.iOS.app/Xamarin.PreBuilt.iOS : mono_dump_native_crash_info
    
    0x1025bac5c - /private/var/containers/Bundle/Application/_SOME_GUID_/MyApp.iOS.app/Xamarin.PreBuilt.iOS : mono_handle_native_crash
    
    0x1025c7bb8 - /private/var/containers/Bundle/Application/_SOME_GUID_/MyApp.iOS.app/Xamarin.PreBuilt.iOS : mono_sigsegv_signal_handler_debug
    0x1ddcd7d50 - /usr/lib/system/libsystem_platform.dylib : <redacted>
    
    0x185a44170 - /System/Library/Frameworks/Foundation.framework/Foundation : <redacted>
    
    0x102769c34 - /private/var/containers/Bundle/Application/_SOME_GUID_/MyApp.iOS.app/Xamarin.PreBuilt.iOS : do_icall
    
    0x1027682c4 - /private/var/containers/Bundle/Application/_SOME_GUID_/MyApp.iOS.app/Xamarin.PreBuilt.iOS : do_icall_wrapper
    
    0x10275f1b8 - /private/var/containers/Bundle/Application/_SOME_GUID_/MyApp.iOS.app/Xamarin.PreBuilt.iOS : interp_exec_method_full
    
    0x10275d748 - /private/var/containers/Bundle/Application/_SOME_GUID_/MyApp.iOS.app/Xamarin.PreBuilt.iOS : interp_runtime_invoke
    
    0x1025cae70 - /private/var/containers/Bundle/Application/_SOME_GUID_/MyApp.iOS.app/Xamarin.PreBuilt.iOS : mono_jit_runtime_invoke
    
    0x102679188 - /private/var/containers/Bundle/Application/_SOME_GUID_/MyApp.iOS.app/Xamarin.PreBuilt.iOS : mono_runtime_try_invoke
    0x1026b3948 - /private/var/containers/Bundle/Application/_SOME_GUID_/MyApp.iOS.app/Xamarin.PreBuilt.iOS : worker_callback
    
    0x1026b11bc - /private/var/containers/Bundle/Application/_SOME_GUID_/MyApp.iOS.app/Xamarin.PreBuilt.iOS : worker_thread
    
    0x1026bc144 - /private/var/containers/Bundle/Application/_SOME_GUID_/MyApp.iOS.app/Xamarin.PreBuilt.iOS : start_wrapper_internal
    0x1026bbfc8 - /private/var/containers/Bundle/Application/_SOME_GUID_/MyApp.iOS.app/Xamarin.PreBuilt.iOS : start_wrapper
    0x1ddce4458 - /usr/lib/system/libsystem_pthread.dylib : _pthread_start
    
    0x1ddce2ab0 - /usr/lib/system/libsystem_pthread.dylib : thread_start
    

    Managed Stacktrace:

      at <unknown> <0xffffffff>
      at ObjCRuntime.Messaging:void_objc_msgSend_IntPtr_UIntPtr <0x00022>
      at Foundation.NSMutableData:AppendBytes <0x00054>
      at Foundation.NSData:FromStream <0x0010c>
      at <LoadImageAsync>d__1:MoveNext <0x00166>
      at MoveNextRunner:InvokeMoveNext <0x00012>
      at <Module>:invoke_void_object <0x0009e>
      at System.Threading.ExecutionContext:RunInternal <0x00134>
      at System.Threading.ExecutionContext:Run <0x00016>
      at MoveNextRunner:Run <0x00058>
      at <Module>:invoke_void <0x00078>
      at System.Threading.Tasks.AwaitTaskContinuation:System.Threa
    

    ding.IThreadPoolWorkItem.ExecuteWorkItem <0x00020>
    at System.Threading.ThreadPoolWorkQueue:Dispatch <0x0014c>
    at System.Func1:invoke_TResult <0x00096> at ObjCRuntime.Runtime:ThreadPoolDispatcher <0x0001e> at System.Func2:invoke_TResult_T <0x0009e>
    at System.Threading._ThreadPoolWaitCallback:PerformWaitCallback <0x00038>
    at <Module>:runtime_invoke_direct_bool <0x00036>

    0 comments No comments

  3. Luca Ziegler 11 Reputation points
    2021-10-29T12:12:15.203+00:00

    When I removed Xamarin.Forms.Visual.Material in the ios project, it worked.

    0 comments No comments

  4. Pascal Pereira 36 Reputation points
    2021-09-22T13:06:21.863+00:00

    An upgrade to VS fixed this at some point... dont remember which version... upgrade to latest and it should work for you.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.