How does JIT know where to look for csc.exe? Also how is this handled by other .NET languages, like IronRuby?
+6
A:
csc.exe produces IL code. JIT produces machine code from the IL code, so correct me if I am wrong but I don't think JIT has anything to do with csc.exe
Darin Dimitrov
2009-03-18 18:27:57
No, you're not wrong at all. The person posting the question needs to do some research on what JIT is.
ctacke
2009-03-18 18:29:21
But isn't stuff compiled on the fly by jit compiler, using the appropriate language compiler?
Joan Venge
2009-03-18 18:29:47
@Joan: No, the language compiler is C# to IL, the JIT compiler is IL to native code.
Jon Skeet
2009-03-18 18:30:13
@ctacke, agreed.
unforgiven3
2009-03-18 18:31:36
@Jon, thanks got it.
Joan Venge
2009-03-18 18:32:28
+2
A:
csc.exe
compiles C# source code to MSIL. The JIT compiler is part of the CLR and is implemented in mscorjit.dll
, which is located with the current CLR (2.0 atm).
Brian Rasmussen
2009-03-18 18:50:01
A:
csc.exe is not used by the JIT. csc.exe outputs intermediate code that is later compiled to native by the JIT. The JIT is installed when you install a version of .Net.
In any case, csc.exe comes with any Windows installation hidden away somewhere in the Windows folder (search is your friend). You can use it as a standalone compiler from the console if you like driving yourself insane.
Davis Gallinghouse
2009-03-19 03:23:09