Site Feed

Friday, October 29, 2004

.NET Assembly Structure – Part 1

In this blog, I will explain the structure of .net assembly. What is an assembly? Prior to explaining what is an assembly, let me give you all a brief preface on where it begins.

Microsoft, the software giant has gone one step ahead of its competitors to bring out the language independent software development environment. Microsoft has brought out their proprietary .net languages such as C#, VB.NET, C++.net, etc. for diverse skilled developers. These high level languages are in reality an abstraction to an intermediary language, which Microsoft has designed, called MSIL.

The MSIL is structured in such a way that the .NET framework can turn them into native code on any Windows platform using a windows specific execution engine called CLR or Common Language Runtime. Microsoft has compilers written for C#, VB.NET etc. which churns the code into the intermediary language or MSIL.

MSIL, what we can from now on call an assembly, is an executable file when it comes under the hood of .NET runtime. The .NET runtime loads the assembly into a process and does a Just in Time compilation. JIT? This is that feature of the CLR which converts the MSIL into native code. The native code is the instructions which the OS understand and the machine can execute. Here is the catch… we have a Windows specific .NET execution engine. Now if we have .NET execution engine specific to other Operating Systems such as Linux or UNIX, we can then call .NET to be platform independent too. There is definitely an effort in this direction from Open source community. This is called Mono, a .net run time for Linux. Microsoft might have their own justification behind not bringing out runtime for other operating systems, but then, that is another topic for debate.

... to be continued.