MonoDevelop .NET Application for Linux

I need to develop C # applications, but I use Linux (ubuntu), I found MonoDevelop, but I don’t understand if I can write .NET applications from Linux for use on Windows, so Linux development and execution on Windows. are they compatible?

On the Mono website, I found:

Mono is a software platform that allows developers to easily create cross-platform applications.

What does it mean? Can I write on Linux C # applications that can be run wherever the .NET platform is installed?

Thanks for clarifying

+4
source share
5 answers

Any C # code that you compile from MonoDevelop or elsewhere can be run on any platform using Mono or the .NET Framework. As long as the Linux system has Mono, it can run any compiled C # application, including .exe copied from a Windows computer.

The reason for this is that when compiling a C # application, it does not compile into its own system code, it compiles into CIL . When you run the program, it automatically JIT compiles your code for the system on which it runs, leaving the original executable intact. Both the .NET Framework on Windows and Mono can read and compile CIL bytecode on everything else.

And one thing to keep in mind, Mono does not have the entire .NET Framework stack available. Almost all BCLs are intact, but libraries like WPF are not available in Mono. Mono recommends using GTK # for your GUIs.

+6
source

Yes, you can use mono to create .NET applications that will run on Linux, Windows, and Mac.

Mono :

This is an open source version of the Microsoft .NET Framework based on ECMA standards for C # and Common Language Runtime.

This means that as long as you do not write platform-specific code, you can run it on all platforms that .NET can run on. (Thus, instead of concatenating paths using \ or / you use Path.Combine , and instead of hardcoding lines like \n you use Environment.NewLine , etc.).

+4
source

Another advantage is that mono orientation tools are free. (see http://www.mono-project.com/Main_Page )

+2
source

You can really write .NET code in Mono on Linux and run the application on Windows, Mac OS X, and Linux.
But keep in mind that the full .NET stack is not available to you. Most notable is the complete lack of support for WPF .

0
source

You can, as long as you try not to accept anything about things, such as the layout of the file system, and use libraries that are also portable. Graphical interfaces in particular are problematic: Windows.Forms looks alien to Linux, and Gtk may feel a little out of place on Windows.

0
source

Source: https://habr.com/ru/post/1398508/


All Articles