.net - Does the .exe file produced by the C# compiler consist solely of Common Intermediate Language(CIL)? -
i trying better grasp on happens in simple scenario when following code added file , saved .cs extension:
public class helloworld { public static void main() { system.console.writeline("hello world!"); system.console.readline(); } }
and program run @ windows command line with:
c:\windows\microsoft.net\framework\v4.0.30319>csc /t:exe /out:c:\helloworld\helloworld.exe c:\helloworld\helloworld.cs
i can see process produces .exe file, when reading compile process on wikipedia states:
- source code converted common intermediate language (cil), cli's equivalent assembly language cpu.
- cil assembled form of so-called bytecode , cli assembly created.
- upon execution of cli assembly, code passed through runtime's jit compiler generate native code...
- the native code executed computer's processor.
so .exe file consist solely of common intermediate lanaguage? , file wikipedia article refers 'cli assembly'? i'm bit confused because can see .exe file , me term 'assembly' infers more 1 file.
and related question:
- is jit compiler somewhere in microsoft.net directory , upon executing .exe file file communicates jit compiler outputs instructions in native code?
no, doesn't.
the executable pe image.
see anatomy of .net assembly – pe headers details.
.net assemblies built on top of pe (portable executable) file format used windows executables , dlls, built on top of msdos executable file format. reason when .net 1 released, wasn’t built-in part of operating system nowadays. prior windows xp, .net executables had load other executable, had execute native code start clr read & execute rest of file.
Comments
Post a Comment