MonoDevelop compiling options

2019-08-01 05:32发布

问题:

I'm developing applications in MonoDevelop for the first time today, and I just need to know how to compile my projects for mac, NOT windows.

When I click "Compile" after right clicking on my project, I always get an exe file. (Which, when tested, DOES work as programmed) That's all fine, and good, but being a mac user, I could really use a way to compile to Mac .app files.

回答1:

Creating .exe files is the whole point. See the Mono manual:

At this point, you must use Mono from the command line, the usual set of commands that are available on other ports of Mono are available.

To build applications you can use "gmcs", to run then you can use mono.

From a Terminal shell, you can try it out:

$ vi hello.cs $ gcs hello.cs $ mono hello.exe Hello, World $

and

Running applications on MacOS X is very similar to linux systems, from the terminal:

mono myprogram.exe



回答2:

To make an app bundle from a GTK# or System.Windows.Forms app, follow these instructions: http://mjhutchinson.com/journal/2010/01/24/creating_mac_app_bundle_for_gtk_app

If you have a MonoMac project, MD will create the app bundle automatically.