How to write programs in C# .NET, to run them on Linux/Wine/Mono?

前端 未结 5 893
攒了一身酷
攒了一身酷 2020-12-08 08:02

In this particular case I need to run .complicated NET application for Linux. By complicated i mean - that project was developed for 3 years and i don\'t wa

5条回答
  •  星月不相逢
    2020-12-08 08:42

    We have a couple of .net applications that run on Windows or Linux with Mono.

    You can develop in VisualStudio if you want, it is not necessary to use the Mono development environment. Only the runtime mono libraries are required in order to run .net applications on Linux.

    We use net 2.0 target to compile these apps in VisualStudio, because mono is nearly 100% compatible with .net 2.0. Mono also implements APIS from later .net versions, but not all and not as complete. If you use features of newer versions than 2.0, you should check if these are supported or use the Mono compatibility analysis tool. You can also use Mono develop instead of Visual Studio, my predecessor was doing that; the result is pretty much the same, and I prefer to use Visual Studio instead.

    We didn't find any major trouble, and the apps are relatively complex, heavily multithreaded, async I/O, WinForms, sockets, serial ports, etc.

    Some app used .net libraries that are not available in MS .net, but all these can be installed on Windows as well so that there is no problem to run these apps in Windows.

    Hope that helps,

提交回复
热议问题