Although it is possible to use any native code compiler in a .NET environment, if a developer wishes to use the CLR (Common Run Time Library) then all development must be based on the Managed Code concept. It is also important to consider the benefits of a Language Neutral RunTime
Managed CodeIt is difficult to get a clear definition of Managed Code, however, we can identify that the development will be using objects (Components) that have been developed in any Language supported by the CLR, then this give a possible definition as;Managed Code is always forced to run within a fixed environment , in the case of .NET this is called the (CLR)
To accomplish this concept of running in a fixed environment we must look to the use of a Virtual Machines (VM) for execution, (this allows the CLR to be totally encapsulated within the VM and eliminates any specific PC Hardware constraints), coupling the VM with a Just In Time Compilation (JIT) of a Intermediary Language (IL), this model is therefore able to execute native code generated at Run Time for a specific processor, and this code is constrained by the VM configuration allowing the above definition for Managed Code to be satisfied.
Such a definition looks to be quite complex, but the architecture of the .NET implementation is quite simple
The Assembles, (these are the .NET CLR files that contain the common objects), are catalogued into the so called Global Assembly Cache (GAS), this is generally situated on the OS disk partition. This catalogue of Objects in conjunction with a new Program Loader and a JIT compiler (to native x86 code for the PC) constitutes the .NET framework
The Assemblies themselves are stored in IL (Intermediate Language) rather than native code, this may seem unnecessary, however, previous solutions to the Component ware concepts such as COM (Common Object Model) which used Binary level compatibility techniques had serious inter operational problems with objects written in different programming languages. So although IL storage is to some extent wasteful in terms of size and speed this is offset by the flexibility offered developers to update and extend Objects and make them available in the Global Assembly Cache effectively building new .NET system level objects.
The supported .NET IL Compilers