I am learning concepts related to .NET framework. I am confused at one point. From what I understand the compilers CSC.exe and AL.exe compiles the files to form assembly based on the switches. So my question is
1) Different compilers in .NET framework targets the CLR. So does this mean that individual files(code) and resource files are compiled to form an assembly and this assembly is executed at runtime by the CLR?
2) How does this happen when I use Visual Studio .NET?
Thanks.
Yes, that is correct. The assembly contains the MSIL translation of the source files, which the CLR converts into machine code and executes.
When you choose the Build command in Visual Studio, it runs the compiler appropriate to the kind of files in your project (e.g. the C# compiler for C# source files), and produces an assembly. (VS doesn’t actually execute csc.exe, al.exe, etc.; it uses in-process equivalents. But the upshot is essentially the same.)