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,294 questions
{count} votes

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

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

    same issue.. :(

    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.


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