Search code examples
c#monovisual-studio-mac

Running Mono C# projects on Mac ... and Winforms


For the first time I am trying Visual Studio for Mac and I located a tutorial for writing a exe that shows a window with a simple menu.

My two questions are:

How does a user of a Mac get the Mono platform? I can't find instructions for deploying Mono. When I look in my exe folder there is no other files. Just the exe.

Maybe this should be a different question but I could not find any "WinForms" version in Visual Studio for mac. I had to use Gtk2 (I think).

If there is a better place to ask these questions please direct me. Thanks.


Solution

  • I know understand that the best course of action was:

    1. Create a Xamarin.Forms multi-platform project.
    2. Create a Cocoa Mac OS project.
    3. Add a reference to project 1 into project 2.
    4. Using Nuget Package Manager download Xamarin.Forms into each project.

    Now it is easy to create an application with XAML (similar to WPF).

    Visual Studio for Mac creates the multi-platform project (step 1 above) automatically with the Android and iOS platform builds, but not the macOS.

    I also see that I don't really need to download Mono as it is all dealt with automatically.