Xamarin App Development: AOT module ‘mscorlib.dll.so’ not found????

So Xamarin is pretty cool, and I’m finally working on my first project with it (whoo!). Problem is, when I got everything installed and ready to roar, a basic “Hello World” app crashed when I deployed it to my Visual Studio Android emulator. The app deployed, launched, and promptly crashed. I got an error akin to this:

“AOT module ‘mscorlib.dll.so’ not found:dlopen failed: library “/data/app-lib/App3.Droid-2/libaot-mscorlib.dll.so” not found” and something along the lines of “could not connect to the debugger”

To be sure, I’m not the only one with a fix for this issue, but seeing as it’s so common, I figured I’d post on it. The Stack Overflow post covers this as well.

Seems like something pretty important is already broken. Never fear, this is an easy fix! The app should deploy and run just fine on a physical device, but it’s complaining when it’s deploying to Visual Studio’s Hyper-V based Android emulator. The first thing to do is to open your Hyper-V manager (click the Start Button, type “Hyper-V” and it should be there) and right click the emulator you intend to use. Please note that the emulator has to be shut off for this to work.

 

hypervmanager

 

In the “Settings” menu,¬†click Processor -> Compatibility and make sure the “Migrate to a physical computer with a different processor version” box is checked.

hyperv2

 

So that’s half the problem fixed. The next thing we want to do is head to our project in Visual Studio and disable the “Fast Deploy” option for Android. We can do this by opening the “Properties” file in the Android project of your solution.

vs1

And there you have it! Run this bad boy, and it should work!

4 Comments

  1. Luis said:

    Thanks , it worked very well.

    July 1, 2016
    Reply
  2. Shawn Wesley said:

    Thanks for the post, worked perfectly

    February 17, 2017
    Reply
  3. Eng Soon Cheah said:

    I cant Check [ / ] the “Migrate to a physical computer with a different processor version”,
    May I ask what are the problems?

    Thank you.

    March 2, 2017
    Reply
    • gavination1322 said:

      Unfortunately, I’ve never run into that one! I’d recommend building up another emulator and trying again.

      April 7, 2017
      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *