Visual Studio For Mac Mono

  1. Visual Studio For Mac Unity
  2. Visual Studio For Mac Marketplace
  3. Visual Studio For Mac Review

Installing on Mac. With this release, we’re introducing a new way to access the Xcode 10 preview support in Visual Studio for Mac. From now on, you’ll be able to access all the necessary bits for Xcode 10 within the IDE, through an updater channel named “Xcode 10 Preview”. Visual Studio for Mac is available to install Visual Studio for Mac builds on top of MonoDevelop, adding open sourced internals from Visual Studio and many new extensions to support new workloads. To get the latest available version, switch to the Stable updater channel after installing.

Active8 days ago

I'm new to Mono development (but not .NET development) - got as far as downloading Visual Studio for Mac and trying to run a sample solution from Alea GPU. It complains that it needs mono64, but I see no option for selecting 64 bit architecture like I would in Windows, and Googling the issue has not turned up an answer I can make sense of. Can I use mono64 in VS for Mac and if so, how?

SushiHangover
58.1k8 gold badges51 silver badges104 bronze badges
see sharpersee sharper
3,4024 gold badges23 silver badges32 bronze badges

2 Answers

Since you are running within VS4M, you need to set the architecture of the run configuration that you are using.

Using an ML (Alea-based) program that I wrote as an example:

Within VS4M:

  • Open the Project Options and go to Run / Configuration / Default:
  • Open the Mono runtime settings and set the Arch to 64-bit:

From the cmd-line:

Mono is 64-bit by default now, so you can run either:

or

Note: On older version of Mono you would have to have used mono --arch=64 .... If you need arch32, you use mono32, but CUDA only has 64 libs so this would not be needed for Alea usage.

Visual Studio For Mac Unity

SushiHangoverSushiHangover
58.1k8 gold badges51 silver badges104 bronze badges

I got mine to work by setting the Project -> Options to run with 32 bit mono.it all works, see pics.

Dr. Roger WebsterDr. Roger Webster
Visual

Not the answer you're looking for? Browse other questions tagged c#macosvisual-studiomonoaleagpu or ask your own question.

by Dan Belcher (Last modified: 05 Dec 2018)

This guide is an overview of Mono and Xamarin and how they relate to RhinoCommon plugins.

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.

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 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:

Mono
  • .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.

Visual Studio For Mac Marketplace

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

Visual Studio For Mac Review

  • Cross Platform User Interface