Do Xamarin.Mac requires MONO installation for distribution?

Do my end user needs to dowload/install MONO for using my Xamarin.Mac desktop app?
Or does Visual Studio MAC bundles MONO inside the .app?


  • ChrisHamonsChrisHamons USXamarin Team Xamurai

    No, assuming you are using Xamarin.Mac Unified (Xamarin.Mac.dll) (which any new project should be) we bundle mono for you in the final application bundle.

    If you open your final bundle, you can find the Assemblies inside a MonoBundle folder and if you nm the native executable you'll see mono symbols we link in.

  • RamonMendesRamonMendes USMember ✭✭
    edited November 2017


    1.So, in my application binary, which is inside /MacOS folder, is where .Net VM in bundled? (it is because it has 6 MB)
    2.My application uses libfreetype, and I know that MONO installer does install it, but I am not sure if bare OSX comes with it... any guess?

  • ChrisHamonsChrisHamons USXamarin Team Xamurai
    1. Yes. You can see this via (replace with your app name/path):

    bin/Debug/ | grep mono

    1. If you depend on libraries that are not part of the base OS (or might be of different version) you can add them as a "native reference" and we'll copy/link them in the bundle.
  • RamonMendesRamonMendes USMember ✭✭
    edited November 2017
    1. Native references are .dylib files?
    2. I have tested adding a native reference, what it does, its output, is to produce APPNAME.dSYM inside /MacOS folder, correct?
    3. But if it produces this dSYM file, how does my DllImport will find the DLL? Example:
      [DllImport("freetype6", CallingConvention = CallConvention)]

    gonna do some tests in the meantime..

  • RamonMendesRamonMendes USMember ✭✭
    edited November 2017

    Think I am wrong, APPNAME.dSYM are the debug symbols for Debug builds.
    Native references .dylib files are simply copied to /MonoBundle.

  • ChrisHamonsChrisHamons USXamarin Team Xamurai

    Native references can be any of the following:

    • .a (static libraries)
    • .dylib (dynamic libraries)
    • .frameworks (framework bundles)

    If you use one of the last two, you can use the library name in your p/invoke. If you use a static library you'll need "__Internal" instead, since it'll be linked into your launcher application.

Sign In or Register to comment.