- Hi Kenichiro, thank you for the update - I am glad you were able to get Visual Studio for Mac installed successfully. If you happen run into any other unexpected behavior, please let us know by opening a new issue via Help > Report a Problem.
- MonoDevelop is a full-featured integrated development environment (IDE) for mono using Gtk#. The MonoDevelop core is also the foundation for Visual Studio for Mac. Feel free to file bugs against Visual Studio for Mac here as well.
- Note that Visual Studio for Mac can be seen as MonoDevelop plus commercial extensions (Xamarin Studio as well). The commercial extensions are not open sourced. Some examples are the.NET Core debugger extension, and the new code editor (ported from Visual Studio 2017).
by Dan Belcher (Last modified: 05 Dec 2018)
This guide is an overview of Mono and Xamarin and how they relate to RhinoCommon plugins.
MonoDevelop (also known as Xamarin Studio) is an open source integrated development environment for Linux, macOS, and Windows. Its primary focus is development of projects that use Mono and.NET frameworks.MonoDevelop integrates features similar to those of NetBeans and Microsoft Visual Studio, such as automatic code completion, source control, a graphical user interface (GUI) and Web designer. Microsoft visual studio mac.
Mono
The Mono framework is an open source implementation of Microsoft’s .NET Framework based on the open standards for the C# language and the Common Language Runtime.
The Mono project has been in active development for over a decade and is used - behind the scenes - in many products.
Mono & Rhino for Mac
Mono allows C# developers to write cross platform code targeting Windows, macOS, Linux, Android, and iOS. What this means for Rhino plugin developers is that they can - if written properly - run the same RhinoCommon plugin in both Rhino for Windows and Rhino for Mac…
RhinoCommon on Mac is executed through an embedded, custom, Mono framework. That means Rhino for Mac is not using the public Mono, nor premium Xamarin.Mac. However, the differences between public MonoMac and Rhino for Mac’s MonoMac are inconsequential.
Xamarin
Xamarin - a subsidiary of Microsoft - is a company founded by the engineers who created Mono. Xamarin is the primary maintainer and commercial sponsor of Mono. Xamarin provides professional developer tools that make cross platform code easier to author, test, and maintain. NOTE: As Xamarin’s platform is being integrated into Microsoft more deeply, some of these titles may change.
The Xamarin platform
The Xamarin Platform is comprised of the following pieces:
- Visual Studio for Mac: C# Integrated Developer Environment (IDE) for Mac. (Visual Studio for Mac was formerly known as Xamarin Studio, which was formerly known as MonoDevelop).
- Xamarin.Android: Used to build C# .NET applications for Android devices. This is useful to have installed if you wish to use the RhinoMobile toolkit, but not required for RhinoCommon in Rhino for Mac.
- Xamarin.iOS: Used to build C# .NET applications for Apple iOS devices. This is useful to have installed if you wish to use the RhinoMobile toolkit, but not required for RhinoCommon in Rhino for Mac.
- Xamarin.Mac: Xamarin’s closed-source version of MonoMac.
For developing RhinoCommon plugins, only Visual Studio for Mac is required.
Visual Studio for Mac
(Formerly known as Xamarin Studio, formerly known as MonoDevelop). This is Microsoft’s C# developer environment that runs on Mac. Visual Studio for Mac has many of the features of Microsoft’s Visual Studio for Windows and uses exactly the same formats as Visual Studio for Windows: solutions (.sln) and C# projects (.csproj). At McNeel, we use Visual Studio for Mac to develop Rhino for Mac and iRhino 3D. We highly recommend you use Visual Studio for Mac when developing RhinoCommon plugins for the Mac.
Xamarin.Mac?
Rhino for Mac does not currently use Xamarin.Mac. Example visual studio for mac building backend api project.
Xamarin.Mac is Microsoft’s proprietary closed-source toolkit used to provide .NET access to native features of the Mac Operating System and to allow for compiling .NET projects into self-contained application bundles. Rhino uses the open source MonoMac framework instead of Xamarin.Mac for accessing native macOS features (primarily native user interface features).
![Visual Studio For Mac Mono Visual Studio For Mac Mono](https://developer.xamarin.com/releases/vs-mac/preview/vs-mac-preview1/images/netcore-debugging.png)
Visual Studio for Windows support?
Xamarin offers a Visual Studio for Windows extension, however this extension is only useful for Xamarin.iOS and Xamarin.Android development, not for RhinoCommon. If you are writing RhinoCommon plugins you are free to use Visual Studio for Windows - when targeting either Rhino for Mac or Rhino for Windows - just as you normally would. When you want to debug and test your plugin in Rhino for Mac, you will have to use Visual Studio for Mac, but you can use the exactly same solution and project files to do this.
Solution & Project
Visual Studio for Mac uses the same formats as Visual Studio for Windows:
- .sln
- .csproj
It is important to stress: these are Visual Studio solutions and projects. You can open solutions and projects created in Visual Studio for Mac in Visual Studio for Windows and vice-versa.
Porting .NET code
All of .NET is not yet implemented in Mono (although an awful lot is). We recommend launching your plugin project in Visual Studio for Mac and attempting to compile. That is the best way to find any potential problems with getting your plugin to run on Rhino for Mac. Please let McNeel know if you find something is missing from the SDK that you need, we may be able to provide this functionality in a Rhino for Mac service release.
P/Invoke
One of the areas that developers need to be aware of is any .NET code that uses P/invoke may experience problems when running on Mac. P/invoke is a technique to call unmanaged native functions from .NET code. The feature is available on macOS/mono, but developers need to make sure that the P/invoke calls are calling native code written for macOS and not for Windows. Many commercial .NET components use P/invoke so this is something we highly recommend you investigate.
UI and Eto
User interface is where developers typically run into trouble with platform specific dependencies and features. We use and support development of Eto. Using Eto can make your plugin look and work as a native application on all platforms, using a single UI codebase. Eto ships with Rhino for Mac (and will ship with Rhino 6 for Windows). Eto has an easy to use API and uses native toolkits, abstracting the platform-specific implementations for WinForms (GDI and Direct2D), WPF, and Cocoa (on macOS). Though Eto is powerful, it has a shallow learning curve and we’re confident you will be hooked as quickly as we were.
Related Topics
- Cross Platform User Interface
Option 1: Install Visual Studio Code
Visual Studio Code is a free, open source, cross platform source code editorsupporting a lot of languages.F# is supported by the Ionide project and is a nice integration.
- Install Visual Studio Code for Mac
- Install the latest version of Mono from the Mono project or via Homebrew (see option 5 below).
- Add Mono
/bin
folder to yourPATH
:export PATH=$PATH:/Library/Frameworks/Mono.framework/Versions/Current/bin/
. For more info see: Mono installed on Mac, but not recognized in terminal - Go back to VS Code, press
Cmd+P
and enter the following to install the Ionide package.
Option 2: Install Visual Studio for Mac
Visual Studio for Mac is a free IDE for general purpose development.
You can create new projects and cross-compile projects built in Visual Studio and other environments.See the Mac, Linux and Cross-Platform Dev Guide togo further. For 64-bit support, see below.
Option 3: Install JetBrains Rider
JetBrains Rider is a cross-platform .NET IDE built using IntelliJ and ReSharper technology. It offers support for .NET and .NET Core applications on all platforms.
- Install JetBrains Rider for Mac.
- Install the latest version of Mono.
- Ensure Mono
/bin
folder is added to yourPATH
:export PATH=$PATH:/Library/Frameworks/Mono.framework/Versions/Current/bin/
. For more info see: Mono installed on Mac, but not recognized in terminal
Option 4: Install the .NET Core CLI
You can use the .NET Core CLI to install F#. To learn more, see Get started with F# with the .NET Core CLI.
Option 5: Install F# via Mono
To use the F# command-line compiler via Mono and tools on Mac OSX:
- Install Mono. Use version 4.2.0 or later.
- Add Mono
/bin
folder to yourPATH
:export PATH=$PATH:/Library/Frameworks/Mono.framework/Versions/Current/bin/
. For more info see: Mono installed on Mac, but not recognized in terminal
See the Mac, Linux and Cross-Platform Dev Guide togo further. For 64-bit support, see below.
Option 5: Install F# with Mono via Homebrew (64-bit)
F# is installed as part of the Mono homebrew formula:
You can configure Xamarin Studio to use this 64-bit installation: Preferences > .NET Runtimes > Add >
/usr/local
Option 6: Install F# (64-bit) from source
To use the F# command-line compiler and tools on Mac OSX in 64-bit mode:
- Get and build a 64-bit installation of the runtime used by F# from source.Set the “–prefix” flag, e.g. “–prefix=/mono64”
git clone https://github.com/mono/mono
cd mono
./autogen.sh --prefix=/mono64 --enable-nls=no
make
sudo make install
- Set the “–prefix” flag, e.g. “–prefix=/mono64”
git clone https://github.com/fsharp/fsharp
cd fsharp
./autogen.sh --prefix=/mono64
Fl studio for mac for free pirite 12.make
sudo make install
- When you run mono, use
/mono64/bin/mono
and put/mono64/bin
on your path. Adjust other applications that launch mono to use this location. - Xamarin Studio and MonoDevelop run applications in 32-bit mode by default. You can configure additional runtimes under Preferences > .NET Runtimes to benefit from 64-bit execution. Beautiful studio microphone for a woman.