The MSDN article on the C# command-line compiler /lib switch specifies the following:-
The compiler searches for assembly references that are not fully qualified in the following order:
Current working directory. This is the directory from which the compiler is invoked.
The common language runtime system directory.
Directories specified by /lib.
Directories specified by the LIB environment variable.
How do you programmatically determine where the CLR runtime system directory is located on the system?