Is ngen used to compile .NET code into a binary file that does not require installing the .NET framework when running the code?

I read the following paragraph of the Wikipedia article on the CLR:

Alternatively, the CIL code can be compiled into native code in a separate step prior to launch using the Custom Image Generator (NGEN). This speeds up all subsequent software as CIL-to-native compilation is no longer needed.

Does this mean that I can take any .NET program and compile it into a binary file, which can then be run on a computer on which the .NET platform is not installed?

+3
source share
3 answers

No.

, JIT (Just-In-Time) , NGen. .Net-, .

, .Net framework , .NET . http://www.xenocode.com/. VMWare Thinstall, , , : http://www.vmware.com/products/thinapp/.

+5

MSDN Ngen, :

Ngen.exe , , , . " " (JIT) .

( ), Ngen , JIT, . .NET .

+2

'NGen ' . .NET .

Mono, however, has a static compiler and linker that can do this. This, for example, support for Mono iPhone.

+2
source

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


All Articles