question

WillAutioItrax avatar image
2 Votes"
WillAutioItrax asked SabarinathGopalan-5585 commented

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

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!

dotnet-xamarinforms
· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi, WillAutioItrax. Did you face the issue in debug mode or release mode? What the linker option do you set for the project? Please share the configuration about build and the test environment.

0 Votes 0 ·

@JarvanZhang-MSFT Thanks for your interest in this issue. I got it while in Debug. Linker option: Linker Behavior- Don't Link.
We do not have an automated Build. I use Visual Studio 2019 v 16.10.0

Regards,
Will

0 Votes 0 ·

1.What nuget do you install in the project? Please make sure the packages are installed on both shared project and nativie project. And add the initialization command if necessary.

2.Try to clear the binand obj folder, then open the project and build again.

0 Votes 0 ·

Hi,
were you able to resolve it?

0 Votes 0 ·
PascalPereira-7530 avatar image
1 Vote"
PascalPereira-7530 answered PascalPereira-7530 published

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.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

LyndonHughey avatar image
0 Votes"
LyndonHughey answered LyndonHughey edited

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?

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

SabarinathGopalan-5585 avatar image
0 Votes"
SabarinathGopalan-5585 answered

same issue.. :(

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

PascalPereira-7530 avatar image
0 Votes"
PascalPereira-7530 answered SabarinathGopalan-5585 commented

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

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

thanks. I was able to solve it, it was an issue of object reference not set, due to serilog. Because Serilog with appcenter couldnt be instantiated until the app finsihed loading.

0 Votes 0 ·