1

We are porting a rather big mostly .Net based application to macOS, consisting of multiple managed and native libraries and applications. We want to bundle the Mono.framework (4.8) in our application bundle.

But sadly the Mono.framework is rather large (about 1GB), and we do not need most of its features. We only need the runtime, and some very basic class libraries. No GTK or other GUI libraries, no debug symbols and no build tools (xbuild, mcs, etc.).

What is the minimum we need when bundling, and how do we identify what can be left out?

This question at Reduce Mono runtime size seems to indicate that we should build mono from source to get it down to around 180MB. Is this the preferred way and minimum size?

Community
  • 1
  • 1
sanosdole
  • 2,469
  • 16
  • 18
  • Is Gtk# the sole reason to use Mono? – bl4y. Mar 21 '17 at 18:05
  • We do not use Gtk#. – sanosdole Mar 21 '17 at 18:07
  • Okay. Why did you choose Mono over .NET Core? – bl4y. Mar 21 '17 at 18:09
  • Mostly history, but we need some features and libraries not available on .NET Core (e.g. HttpListener, NHibernate). We'll probably move to .NET Core in the future, but this is out of scope for now. – sanosdole Mar 22 '17 at 08:27
  • What kind of apps? Console? Use Mono AOT you can bundle the runtime with your apps and shrink the size, http://www.mono-project.com/docs/advanced/aot/ if you use Xamarin.Mac it is even simpler, https://developer.xamarin.com/guides/mac/deployment,_testing,_and_metrics/publishing_to_the_app_store/bundling/ – Lex Li Mar 25 '17 at 01:18
  • @LexLi: Not quite sure if AOT is applicable here, as we use lots of generics, dynamic proxies and require 64Bit. But I'll check it out. – sanosdole Mar 27 '17 at 08:39

0 Answers0