JorgeeFG
JorgeeFG

Reputation: 5961

Can C# console app be run in Linux without Mono?

In Wikipedia (https://en.wikipedia.org/wiki/Common_Intermediate_Language#General_information) about CIL, it says:

Upon execution of a CLI assembly, its code is passed through the runtime's JIT compiler to generate native code. Ahead-of-time compilation may also be used, which eliminates this step, but at the cost of executable-file portability.

So, is there a way to make Mono compile using ahead-of-time compilation, to produce native code that can be executed like a binary written in C/C++?

Upvotes: 2

Views: 2161

Answers (1)

Lex Li
Lex Li

Reputation: 63203

The short answer is Yes. Mono does have its information at http://www.mono-project.com/docs/advanced/aot/.

Simply speaking, you need Mono during development to perform AOT. Then the generated binaries can be deployed to machines without Mono (with a few limitations though).

Upvotes: 1

Related Questions