Forum Visual Studio

Announcement:

The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

Visual Studio Emulator for Android: app not starting because mscorlib.dll is not found

anveanve DEMember ✭✭✭

I created a new project from the Xamarin Forms Shared Project template. Now I want to run the Visual Studio Emulator for Android. The simulator starts, but the app is exited. This is the debug output:

InspectorDebugSession(0): StateChange: Start -> EntryPointBreakpointRegistered
InspectorDebugSession(0): Constructed
Android application is debugging.
03-25 12:53:42.485 D/dalvikvm( 1172): Late-enabling CheckJNI
03-25 12:53:42.505 D/dalvikvm( 1172): Trying to load lib /data/app-lib/Test.Droid-1/libmonodroid.so 0xacf8bac0
03-25 12:53:42.505 D/dalvikvm( 1172): Added shared lib /data/app-lib/Test.Droid-1/libmonodroid.so 0xacf8bac0
03-25 12:53:42.525 W/monodroid( 1172): Using override path: /data/data/Test.Droid/files/.override
03-25 12:53:42.525 W/monodroid( 1172): Using override path: /storage/emulated/0/Android/data/Test.Droid/files/.override
03-25 12:53:42.525 W/monodroid( 1172): Trying to load sgen from: /data/data/Test.Droid/files/.override/libmonosgen-2.0.so
03-25 12:53:42.525 W/monodroid( 1172): Trying to load sgen from: /storage/emulated/0/Android/data/Test.Droid/files/.override/libmonosgen-2.0.so
03-25 12:53:42.529 W/monodroid( 1172): Trying to load sgen from: /data/app-lib/Test.Droid-1/libmonosgen-2.0.so
03-25 12:53:42.529 W/monodroid( 1172): Trying to load sgen from: /data/data/Test.Droid/files/.override/links/libmonosgen-2.0.so
03-25 12:53:42.529 W/monodroid-debug( 1172): Trying to initialize the debugger with options: --debugger-agent=transport=dt_socket,loglevel=0,address=127.0.0.1:8973,server=y,embedding=1
03-25 12:53:42.693 W/monodroid-debug( 1172): Accepted stdout connection: 43
03-25 12:53:43.509 D/Mono ( 1172): Image addref mscorlib[0xb8a9dd90] -> mscorlib.dll[0xb8a9d3b0]: 1
03-25 12:53:43.509 D/Mono ( 1172): AOT module 'mscorlib.dll.so' not found: dlopen failed: library "/data/app-lib/Test.Droid-1/libaot-mscorlib.dll.so" not found
03-25 12:53:43.509 D/Mono ( 1172): AOT module '/Users/builder/data/lanes/2970/46c3f7e0/source/monodroid/builds/install/mono-x86/lib/mono/aot-cache/x86/mscorlib.dll.so' not found: dlopen failed: library "/data/app-lib/Test.Droid-1/libaot-mscorlib.dll.so" not found
03-25 12:53:43.525 D/Mono ( 1172): Unloading image data-0x9be99010 [0xb8a9ddf0].
03-25 12:53:43.549 D/Mono ( 1172): Assembly mscorlib[0xb8a9dd90] added to domain RootDomain, ref_count=1
Could not connect to the debugger.
InspectorDebugSession(0): Disposed
InspectorDebugSession(0): HandleTargetEvent: TargetExited
[Inspector] Can't inspect Android apps unless 'Fast assembly deployment' is enabled

mscorlib.dll.so seems not to be found. What can I do?

Best Answer

Answers

  • kentuckerkentucker USMember ✭✭✭✭✭

    Look in your properties for the app. Make sure fast deploy is not checked.

  • anveanve DEMember ✭✭✭

    I tried to disable fast deployment. The result is the same: App starts up and gets closed.

    Android application is debugging.
    [Inspector] Can't inspect Android apps unless 'Fast assembly deployment' is enabled
    03-29 09:13:08.534 D/dalvikvm( 1137): Late-enabling CheckJNI
    03-29 09:13:08.574 D/dalvikvm( 1137): Trying to load lib /data/app-lib/MyApp.Droid-1/libmonodroid.so 0xa8ff4d40
    03-29 09:13:08.578 D/dalvikvm( 1137): Added shared lib /data/app-lib/MyApp.Droid-1/libmonodroid.so 0xa8ff4d40
    03-29 09:13:08.594 W/monodroid( 1137): Using override path: /data/data/MyApp.Droid/files/.override
    03-29 09:13:08.594 W/monodroid( 1137): Trying to load sgen from: /data/data/MyApp.Droid/files/.override/libmonosgen-2.0.so
    03-29 09:13:08.594 W/monodroid( 1137): Trying to load sgen from: /storage/emulated/0/Android/data/MyApp.Droid/files/.override/libmonosgen-2.0.so
    03-29 09:13:08.594 W/monodroid( 1137): Trying to load sgen from: /data/app-lib/MyApp.Droid-1/libmonosgen-2.0.so
    03-29 09:13:08.594 W/monodroid( 1137): Trying to load sgen from: /data/data/MyApp.Droid/files/.override/links/libmonosgen-2.0.so
    03-29 09:13:08.594 W/monodroid-debug( 1137): Trying to initialize the debugger with options: --debugger-agent=transport=dt_socket,loglevel=0,address=127.0.0.1:8955,server=y,embedding=1
    03-29 09:13:08.762 W/monodroid-debug( 1137): Accepted stdout connection: 43
    03-29 09:13:09.690 D/Mono ( 1137): Image addref mscorlib[0xb818eba0] -> mscorlib.dll[0xb818de50]: 1
    03-29 09:13:09.690 D/Mono ( 1137): AOT module 'mscorlib.dll.so' not found: dlopen failed: library "/data/app-lib/MyApp.Droid-1/libaot-mscorlib.dll.so" not found
    03-29 09:13:09.690 D/Mono ( 1137): AOT module '/Users/builder/data/lanes/2970/46c3f7e0/source/monodroid/builds/install/mono-x86/lib/mono/aot-cache/x86/mscorlib.dll.so' not found: dlopen failed: library "/data/app-lib/MyApp.Droid-1/libaot-mscorlib.dll.so" not found
    03-29 09:13:09.814 D/Mono ( 1137): Unloading image data-0x91d9b010 [0xb818ec40].
    03-29 09:13:10.042 D/Mono ( 1137): Assembly mscorlib[0xb818eba0] added to domain RootDomain, ref_count=1
    Could not connect to the debugger.
    [Inspector] Can't inspect Android apps unless 'Fast assembly deployment' is enabled

    The app is deployed on the simulator, but I can't debug it.

  • Hi Markus,
    you solved the problem? I'm in the same situation :'(

  • RudolfStepanRudolfStepan USMember ✭✭

    FYI:

    I'd run also into this issue but followed Reyes hint (....Xamarin has a helpful page HERE) which fixed my problem.

  • anveanve DEMember ✭✭✭

    @GiovanniSantoriello: I think this was the solution by enabling the option to migrate to physical computer.

Sign In or Register to comment.