You also need to use mono32 since WinForms isn’t supported on 64bit yet.
NOTE: on macOS you’ll have to wait around a minute the very first time you run this command. To compile, use csc with the -r option to tell the compiler to pull in the WinForms libraries: csc hello.cs -r: The following program tests writing a application. The program prints the website contents if everything works or throws an exception if it doesn’t. To make sure HTTPS connections work, run the following command to check whether you can connect to : csharp -e 'new ().DownloadString ('')'
The program should run and output: Hello Mono World The compiler will create “hello.exe”, which you can run using: mono hello.exe Note: csc compiler is not available on all platforms or in very old Mono versions, in such cases use mcs instead.
To test the most basic functionality available, copy the following code into a file called hello.cs. That way you’ll know that your Mono is working before you try writing or running a more complex application. After you get Mono installed, it’s probably a good idea to run a quick Hello World program to make sure everything is set up properly.