Creating an executable for Linux using Mono?

I want to create a C # tool that should run on the Apache web server whenever it is called through PHP (for example, using the exec command). Since I'm new to this, it would be great if you could help me:

1) If I compile C # code on my Windows system using Mono and the msc command, will it create a file that can also be executed on Linux, i.e. on the Apache web server? (it is definitely executable on Windows) If not, how do I create Linux executables using Mono for Windows?

2) Is there something to consider when trying to invoke an application on an Apache web server through PHP? Permission Rights?

+4
source share
1 answer

1: First question on Mono Frequently Asked Questions :

Can Mono run executable files created by Visual Studio?

Yes, Mono can run executable files created by Visual Studio, there is no need to recompile.

Use our Mono migration analysis tool to check if everything that your application uses in Mono has been implemented, or if there are special considerations to consider.

The Mono API today is somewhere between .NET 2.0 and .NET 4.0, see our roadmap for details on what is implemented.

2: I cannot speak specifically for PHP, but I believe that you will need to start the process using the mono executable (for example, mono /path/to/exe/SomeTool.exe )

+4
source

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


All Articles