tags:

views:

280

answers:

3

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
No, you're not wrong at all. The person posting the question needs to do some research on what JIT is.
ctacke
But isn't stuff compiled on the fly by jit compiler, using the appropriate language compiler?
Joan Venge
@Joan: No, the language compiler is C# to IL, the JIT compiler is IL to native code.
Jon Skeet
@ctacke, agreed.
unforgiven3
@Jon, thanks got it.
Joan Venge
+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
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