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

WillAutioItrax 201 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!

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,296 questions
{count} votes

6 answers

Sort by: Newest
  1. 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

  2. Luca Ziegler 6 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

  3. 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.


  4. Sabarinath Gopalan 1 Reputation point
    2021-09-22T03:23:10.13+00:00

    same issue.. :(

    0 comments No comments

  5. LyndonHughey 1 Reputation point
    2021-08-05T16:23:26.697+00:00

    I'm noticing the same issue and not able run the app on physical devices. I do notice that the SDK version isn't in the dropdown?

    0 comments No comments