When you compile a C# program, using the command line compiler csc.exe, it automatically looks at various .Net standard library DLLs, both the ones always implicitly referenced, and the ones you explicitly reference with -r, such as -r:System.Numerics.dll.
How does it know where to find them? For example, on my Windows machine are currently 19 different versions of System.Numerics.dll (possibly with some duplicates); how does csc know which directory to look in?
If they handle it differently, I am asking about the command line compiler, not about the Visual Studio IDE.
Also, to the extent that they are different, I'm asking about what happens at compile time (where the compiler needs to read the DLLs for e.g. type checking) and not at run time (where the DLLs are loaded in order to actually call the code).