#Compile c# mono framework 4.5 install
You install it like this: sudo-apt-get install monodevelop Obviously writing applications by hand like this is a bit cumbersome, but there is an IDE you can use for Linux called monodevelop. To run the application, simply call mono, passing in the executable: mono wf.exeĪnd that’s all there is to it! We have a WinForms app running on Linux.Īlthough mono doesn’t support everything in WinForms, you can use most standard controls, so you can easily add further UI elements: We’ll need to tell it we’re referencing the Windows Forms DLL: gmcs wf.cs -r: Now let’s create a very simple application: using System Launch it with the following command: (the ampersand at the end tells the terminal not to wait for gedit to close before letting us continue) gedit wf.cs & You can use any text editor you like, but if like me you aren’t familiar with Linux text editors like vi or emacs, gedit is a simple notepad-like application which is easy to use. Now we need to create our C# source file. Now you can install mono with the following command: sudo apt-get install mono-complete Open a terminal window, and make sure everything is up to date with the following commands: sudo apt-get update
![compile c# mono framework 4.5 compile c# mono framework 4.5](https://cdn.educba.com/academy/wp-content/uploads/2018/08/Python-vs-C-768x2326.jpg)
Here’s a simple guide to running a Windows Forms application on Ubuntu Step 1 - Install Mono Although WinForms may be “dead”, it does have one trick up its sleeve that WPF doesn’t, and that is you can run WinForms apps on mono.