Mono framework mac os ��� �������

Compiling Mono on macOS

Pick an installation directory where you want your new copy of Mono to be installed. Lets call that location PREFIX. Your Mono installation and its dependencies will be installed there. For example, I like to use the directory /opt/mono, so I would replace PREFIX with /opt/mono in the following discussion.

If you have more than one Mono installation (for example to keep multiple versions around), you will want to read the document on Parallel Mono Environments on how to keep your various Mono installations separate.

It is strongly advised not to install Mono from source in /usr as it might conflict with Mono as installed by the Mono package.

Building Mono

Building Mono is a very simple process as Mono has very few external dependencies.

On Mavericks and later versions you will need to install some tools that are no longer part of the developer SDK, but luckily this is a very simple process.

Building Mono Dependencies

Mono uses GNU autoconf, automake and libtool. You need to install those in your path, e.g. through Homebrew

Mono releases are distributed as .tar.xz packages from the Mono web site. Once you have your dependencies installed all you need to do is run the following command where VERSION is the package version number and PREFIX is your installation prefix:

If you wish to compile Mono in 64 bit mode instead use this to configure the build:

By the end of this process, you will have Mono installed on your PREFIX directory.

Building Mono From a Git Source Code Checkout

To build Mono from a Git Source Code checkout, you will want to have the official Mono installed on the system, as the build requires a working C# compiler to run. Once you do this, run the following commands, remember to replace PREFIX with your installation prefix that you selected:

To build Mono in 32 bit mode instead use this to configure the build:

One Stop Shop Build Script

If you just want to install Mono without thinking too much, just copy and paste the following script, and enter your root password when requested:

Troubleshooting

If you receive an error like:

This means that configure was able to resolve some optional dependencies in your environment (gettext or glib primarily) that have been compiled for 64-bit when you are building a 32-bit mono or vice-versa. To resolve this either rebuild the dependency to be a universal binary or build a mono that matches your dependencies.

Источник

macOS

Introduction to Mono on macOS

Mono supports macOS version 10.9 (Mavericks) and later.

You can use Mono on macOS to build server, console and GUI applications. Read below for the options available for GUI application development.

If you are interested in creating native GUI applications, use the MonoMac bindings and our MonoDevelop add-in. Read the description on MonoMac for more information on how to get started.

Installing Mono on macOS

You can use Mono either as a runtime to run existing application, or as an SDK to develop new applications with Mono.

Visit the download page to find the latest macOS package. Run it and follow the instructions there, you can either get a basic runtime, or a complete runtime plus a software development kit.

Читайте также:  Как восстановить загрузчик виндовс после удаления линукса

If you plan on developing applications with Mono, we suggest that you also install the MonoDevelop IDE after you install Mono.

The Mono package includes:

  • The Mono Runtime
  • GUI Toolkits: Windows.Forms and Gtk# for macOS.
    • Note: the MonoMac GUI toolkit for native macOS GUI development is currently a separate download.
  • SDK: C#, Visual Basic compilers, assemblers and tools
  • XSP ASP.NET server
  • Manual pages.

This package installs as a framework into /Library/Frameworks/Mono.framework (the same way the Java packages are installed). The executable binaries can be found in /Library/Frameworks/Mono.framework/Versions/Current/bin . If you’d like to access the mono manpages you’ll have to add /Library/Frameworks/Mono.framework/Versions/Current/man to your manpath. The macOS Mono package does not include Gtk#, XSP or mod_mono. These will have to be compiled from source.

Our packages currently require macOS version 10.9 or later, for older versions, you will need to build from source code.

Using Mono on macOS

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 “mcs”, to run then you can use mono.

From a Terminal shell, you can try it out:

Most users would be using the MonoDevelop IDE to create their projects.

You will have a choice of GUI toolkits for building your application, from pure cross platform, to Mac-specific using MonoMac.

32 and 64 bit support

The Mono packages published on this web site provide both a 32-bit and a 64-bit Mono VM.

Starting from Mono 5.2 the mono command defaults to 64-bit, you can use the —arch=32/64 switch to control the bitness.

The 64 bit support has a few limitations today:

  • Our Windows.Forms implementation uses Carbon, and as such, it would not work with a 64-bit Mono.

Building Client Applications

There are a few choices to build client applications on macOS, you should pick the technology that better fits your goals, your choices are:

Toolkit Runs on Linux Runs on Windows Runs on Mac Binding Style License Status
MonoMac no no yes Strongly typed C# binding to Cocoa APIs MIT X11 Actively developed, builds on the design lessons from MonoTouch but still incomplete. This will be the new default binding for Mono on macOS. Separate download.
Gtk# yes yes yes Strongly typed C# binding to the cross platform Gtk+ API. Applications look foreign on macOS. LGPL v2 Actively developed, cross platform. Bundled with Mono.
Windows.Forms yes yes yes Cross platform implementation of Microsoft’s Windows.Forms. Applications look foreign on macOS. MIT X11 The Windows.Forms API was frozen in time by Microsoft. Bundled with Mono.
MonObjc no no yes Binding to the native Cocoa APIs, but requires manual use of Objective-C selectors to work with, relatively thin wrapper around the underlying APIs. LGPL v3 Actively developed. Separate download.
CocoaSharp no no yes Binding to the native Cocoa APIs, but requires manual use of Objective-C selectors to work with, relatively thin wrapper around the underlying APIs. MIT X11 No longer developed, no longer maintained, deprecated. Bundled with Mono.

Running Mono applications on macOS

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

For GTK# applications, it’s easiest to run them the same way but using xterm from X11.app

Windows.Forms

Mono’s implementation of the System.Windows.Forms API is built on top of Carbon and can only run with Mono on 32 bit systems. The look and feel of System.Windows.Forms applications mimics the Windows style and does not currently render like a native macOS application.

Third Party Libraries

ObjC# is a transparent two way bridge that allows the CLR to access the rich underlying ObjectiveC frameworks as well as providing direct access to the CLR frameworks from the ObjectiveC language.

Источник

Download

The latest Stable Mono release is: 6.12.0 Stable (6.12.0.122)

Please choose your operating system to view the available packages. Source code is available on GitHub (viewing only) or as a Tarball.

macOS Linux Windows Docker

Mono for macOS is available as a Mac Package (.pkg)

Please refer to the installation guide for more information about how to install and configure your Mono environment.

Supported on macOS 10.9 and later. Check the uninstall instructions if you want to remove Mono from your Mac.

* We recommend this package if you’re using Visual Studio for Mac since the stability of Visual Studio for Mac is only guaranteed with the Visual Studio channel releases.

Читайте также:  Где windows 10 хранит аватар пользователя

1 Add the Mono repository to your system

The package repository hosts the packages you need, add it with the following commands.

Note: the packages should work on newer Ubuntu versions too but we only test the ones listed below.

Ubuntu 20.04 (amd64, armhf, arm64, ppc64el)

Ubuntu 18.04 (i386, amd64, armhf, arm64, ppc64el)

Ubuntu 16.04 (i386, amd64, armhf, arm64, ppc64el)

2 Install Mono

The package mono-devel should be installed to compile code.

The package mono-complete should be installed to install everything — this should cover most cases of «assembly not found» errors.

The package mono-dbg should be installed to get debugging symbols for framework libraries — allowing you to get line numbers in stack traces.

The package referenceassemblies-pcl should be installed for PCL compilation support — this will resolve most cases of «Framework not installed: .NETPortable» errors during software compilation.

The package ca-certificates-mono should be installed to get SSL certificates for HTTPS connections. Install this package if you run into trouble making HTTPS connections.

The package mono-xsp4 should be installed for running ASP.NET applications.

3 Verify Installation

After the installation completed successfully, it’s a good idea to run through the basic hello world examples on this page to verify Mono is working correctly.

Notes

Mono on Linux before 3.12 by default didn’t trust any SSL certificates so you got errors when accessing HTTPS resources. This is not required anymore as 3.12 and later include a new tool that runs on package installation and syncs Mono’s certificate store with the system certificate store (on older versions you had to import Mozilla’s list of trusted certificates by running mozroots —import —sync ). Some systems are configured in a way so that the necessary package isn’t pulled in when Mono is installed, in those cases make sure the ca-certificates-mono package is installed.

1 Add the Mono repository to your system

The package repository hosts the packages you need, add it with the following commands.

Note: the packages should work on newer Debian versions too but we only test the ones listed below.

Debian 10 (i386, amd64, armhf, arm64, armel, ppc64el)

Debian 9 (i386, amd64, armhf, arm64, armel, ppc64el)

2 Install Mono

The package mono-devel should be installed to compile code.

The package mono-complete should be installed to install everything — this should cover most cases of «assembly not found» errors.

The package mono-dbg should be installed to get debugging symbols for framework libraries — allowing you to get line numbers in stack traces.

The package referenceassemblies-pcl should be installed for PCL compilation support — this will resolve most cases of «Framework not installed: .NETPortable» errors during software compilation.

The package ca-certificates-mono should be installed to get SSL certificates for HTTPS connections. Install this package if you run into trouble making HTTPS connections.

The package mono-xsp4 should be installed for running ASP.NET applications.

3 Verify Installation

After the installation completed successfully, it’s a good idea to run through the basic hello world examples on this page to verify Mono is working correctly.

Notes

Mono on Linux before 3.12 by default didn’t trust any SSL certificates so you got errors when accessing HTTPS resources. This is not required anymore as 3.12 and later include a new tool that runs on package installation and syncs Mono’s certificate store with the system certificate store (on older versions you had to import Mozilla’s list of trusted certificates by running mozroots —import —sync ). Some systems are configured in a way so that the necessary package isn’t pulled in when Mono is installed, in those cases make sure the ca-certificates-mono package is installed.

1 Add the Mono repository to your system

The package repository hosts the packages you need, add it with the following commands.

Note: the packages should work on newer Raspbian versions too but we only test the ones listed below.

Raspbian 10 (armhf)

Raspbian 9 (armhf)

2 Install Mono

The package mono-devel should be installed to compile code.

The package mono-complete should be installed to install everything — this should cover most cases of «assembly not found» errors.

The package mono-dbg should be installed to get debugging symbols for framework libraries — allowing you to get line numbers in stack traces.

The package referenceassemblies-pcl should be installed for PCL compilation support — this will resolve most cases of «Framework not installed: .NETPortable» errors during software compilation.

The package ca-certificates-mono should be installed to get SSL certificates for HTTPS connections. Install this package if you run into trouble making HTTPS connections.

Читайте также:  Scheduler linux ��� ���

The package mono-xsp4 should be installed for running ASP.NET applications.

3 Verify Installation

After the installation completed successfully, it’s a good idea to run through the basic hello world examples on this page to verify Mono is working correctly.

Notes

Mono on Linux before 3.12 by default didn’t trust any SSL certificates so you got errors when accessing HTTPS resources. This is not required anymore as 3.12 and later include a new tool that runs on package installation and syncs Mono’s certificate store with the system certificate store (on older versions you had to import Mozilla’s list of trusted certificates by running mozroots —import —sync ). Some systems are configured in a way so that the necessary package isn’t pulled in when Mono is installed, in those cases make sure the ca-certificates-mono package is installed.

1 Add the Mono repository to your system

The package repository hosts the packages you need, add it with the following commands in a root shell.

Note: the packages should work on newer CentOS/RHEL versions too but we only test the ones listed below.

CentOS/RHEL 8 (x86_64)

CentOS/RHEL 7 (x86_64)

CentOS/RHEL 6 (x86_64, i686)

2 Install Mono

The package mono-devel should be installed to compile code.

The package mono-complete should be installed to install everything — this should cover most cases of «assembly not found» errors.

The package referenceassemblies-pcl should be installed for PCL compilation support — this will resolve most cases of «Framework not installed: .NETPortable» errors during software compilation.

The package xsp should be installed for running ASP.NET applications.

3 Verify Installation

After the installation completed successfully, it’s a good idea to run through the basic hello world examples on this page to verify Mono is working correctly.

1 Add the Mono repository to your system

The package repository hosts the packages you need, add it with the following commands in a root shell.

Note: we’re using the CentOS/RHEL repositories on Fedora.

Fedora 29 and later (x86_64)

Fedora 28 (x86_64)

2 Install Mono

The package mono-devel should be installed to compile code.

The package mono-complete should be installed to install everything — this should cover most cases of «assembly not found» errors.

The package referenceassemblies-pcl should be installed for PCL compilation support — this will resolve most cases of «Framework not installed: .NETPortable» errors during software compilation.

The package xsp should be installed for running ASP.NET applications.

3 Verify Installation

After the installation completed successfully, it’s a good idea to run through the basic hello world examples on this page to verify Mono is working correctly.

Mono for Windows is available as a Windows Installer file

Please refer to the installation guide for more information about how to install and configure your Mono environment.

Supported on Windows 7, 8, 10 or later.

GTK# for .NET

Installer for running Gtk#-based applications on Microsoft .NET:

Mono is available on Docker Hub

The simplest way to get started is:

This will download the latest Mono Docker image, create a container and put you into an interactive shell.

Available tags

There are several tags for selecting the desired Mono version:

  • latest — Always points to the latest release
  • X.X.X.X — points to a specific version, e.g. 5.8.0.108
  • X.X.X — points to the latest version in the X.X.X series, e.g. 5.8.0
  • X.X — points to the latest version in the X.X series, e.g. 5.8
  • X — points to the latest version in the X series, e.g. 5

The latest version, one minor version before that and the last version before a major version bump are periodically rebuilt by Docker Hub to pull in updates from the base Debian image.

All other version tags are still available, but won’t get those updates so you need to keep your images up to date by running apt update yourself. We encourage you to move to latest Mono releases as soon as they’re available.

Starting with Mono 5.2 we provide a slim variant (e.g. latest-slim ) which only contains the bare minimum to run a simple console app. You can use this as a base and add just what you need.

Release Notes

Check out the release notes of all Mono versions here.

MonoDevelop IDE

Please visit the MonoDevelop website for more details about our cross-platform IDE.

Older releases

To access older Mono releases for macOS and Windows, check the archive on the download server. For Linux, please check the «Accessing older releases» section in the installation guide.

Источник

Оцените статью