by Dan Belcher (Last modified: 18 Feb 2019)

This guide covers all the necessary tools required to author Rhino plugins on Mac.

  • Visual Studio 2017 for Mac is actually a different beast from Visual Studio for Windows. As you may know, it is originally based on Xamarin Studio which on its turn is an extended form of MonoDevelop. Simply put, the extensions you'll find in the Visual Studio Marketplace are not compatible with Visual Studio 2017 for Mac.
  • Instructor Installation of Visual Studio for Macis fairly straight forward with a few caveats.First of all you must have Xcode installedbefore you can install Visual Studio.If you don't have Xcode installed,you can find it in the App Store free of charge.Be forewarned though, Xcode is almost six gigabytes in sizeso installing takes a while.You might want to pack a.

By the end of this guide, you should have all the tools installed necessary for authoring, building, and debugging C# .NET plugins using RhinoCommon in Rhino for Mac.

Uninstall Visual Studio 2019 for Mac Preview. Visual Studio 2019 for Mac Preview was launched as a separate preview, allowing you to continue to work with your Visual Studio 2017 for Mac install side-by-side. Now that Visual Studio 2019 for Mac has been released, you can now safely remove the Visual Studio 2019 for Mac Preview application.

Prerequisites

This guide presumes you have an:

  • Apple Mac running macOS Sierra (10.12.5) or later.
  • Rhino 5 for Mac (5.1) or later.

Install Xcode

Xcode is Apple’s development platform and IDE. Though it is not absolutely required that you install Xcode in order to build, debug, and run C# plugins using RhinoCommon, it is recommended that you do. In short: the Visual Studio for Mac works best with Xcode installed.

Step-by-Step

  1. Xcode is free in the Mac App Store. Click the View in Mac App Store button.
  2. Click the Get > Install App button underneath the Xcode icon.
  3. You will be prompted for your Apple ID (required to download apps on the App Store).
  4. Xcode is large download - nearly 2.6 GB in size. You can monitor the progress of the download in Launchpad. When Xcode is finished downloading an installing, it will be your /Applications folder.
  5. Launch Xcode. On initial launch, Xcode will install some additional components.
  6. Quit Xcode.
Mac

C++ Visual Studio Mac

Install Visual Studio for Mac

Visual Studio for Mac (formerly Xamarin Studio, formerly MonoDevelop) is required to build RhinoCommon plugins on macOS. The core components of the Mono platform that are required are the Mono Framework and Visual Studio for Mac. Please check out the What are Mono and Xamarin? guide for more information.

Step-by-Step

  1. Download Visual Studio for Mac.
  2. Visual Studio for Mac uses an Installer app, which downloads and installs the components that you select. Once you have downloaded the VisualStudioInstaller.dmg, double-click it to mount the disk image. Double-click the big Install Visual Studio.app icon to launch the installer.
  3. You must accept the Visual Studio Software License Agreement.
  4. Visual Studio for Mac can install the following items:
    • Visual Studio + Profiler (required)
    • Android + Xamarin.Forms1 (optional)
    • iOS + Xamarin.Forms2 (optional)
    • macOS - formerly Xamarin.Mac3 (optional)
    • Workbooks and Inspector (optional)
  5. Verify that Visual Studio + Profiler is checked and click Continue.
  6. If you do not have Xcode installed, the installer may prompt you. See Install Xcode above.
  7. The installer downloads and installs: Mono Framework and Visual Studio for Mac
  8. When the installer is finished, click the Launch Visual Studio button.
  9. Visual Studio - along with the Mono Framework and Profiler are now installed.
  10. Visual Studio is installed in your /Applications folder. You will want to drag its icon to your Dock for future use or - if it’s running - right/option-click the icon in the Dock and select Keep in Dock.

Install the RhinoCommon Extension

Install

The RhinoCommon AddIn/Extension is required to debug your plugin code in an active session of Rhino for Mac. Additionally, it contains project templates to get you started creating plugins quickly.

Step-by-Step

  1. Visit the AddIn’s GitHub releases page and find the Latest release in the list of releases.
  2. Download the .mpack file in the list of Downloads on that release. For example, at the time of this writing, the Latest release download is entitled RhinoXamarinStudioAddIn_7.4.3.1.mpack.
  3. Launch Visual Studio for Mac if it not already open.
  4. Navigate to Visual Studio > Extensions…
  5. Click the Install from file… button in the lower left-hand corner.
  6. Navigate to the .mpack file you downloaded in step 2 above.
  7. Click Install. The plugin should install.
  8. IMPORTANT: You must Quit and Restart Visual Studio for Mac.
  9. Navigate to Extensions Studio > Add-ins.. > Installed tab. Verify that RhinoCommon Plugin Support exists under the Debugging category. If it’s there, you have successfully installed the Extension and you are DONE.

Next Steps

Congratulations! You have all the tools necessary to build a RhinoCommon plugin for Rhino for Mac. Now what?

Install Visual Studio 2019 In Mac

Check out the Your First Plugin (Mac) guide for instructions building - your guessed it - your first plugin.

Footnotes

Install Visual Studio Code In Mac

  1. Xamarin.Android is 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. ↩

  2. Xamarin.iOS is 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. ↩

  3. Xamarin.Mac is Xamarin’s proprietary closed-source toolkit build on the open-source MonoMac (aka Mono for macOS). Xamarin.Mac provides a commercial license of Mono, bindings to additional frameworks, and the ability to create self-contained application bundles that do not require mono. Rhino for Mac does not currently use Xamarin.Mac. ↩