Difference between Netmodule and Assembly file

Posted on November 7, 2008. Filed under: .Net |

Hello geeks after a long time, I write some thing that basically tell what the actually difference between .net assembly and Netmodule file. I illustrate this blog by using the following piece of code block.
 
using System;
 
public class CSharpHelloWorld
{
      public CSharpHelloWorld() {}
 
      ///<summary>
      ///
      ///</summary>
      public void displayHelloWorld()
      {
            Console.WriteLine(“Hello World, from C#!”);
      }
}
 
.Net Assembly File
Basically .Net assembly is a compile library that contains code in CIL (Common Intermediate Language) form, which is generated form actual source code and assembly manifest that is a metadata for assembly. It’s practically possible that assembly consist of more than one files e.g. resource file, .netmodule file.
 
Figure 1: [CSharpHelloWorld.dll] Contain assembly manifest and metadata
 
Netmodule File
Netmodule is a unit of compilation. Basically code file is a single module. This is the feature of the specific compiler to compile the source code into assembly or a netmodule. Netmodule only contain type metadata and compiled code (netmodule does not required assembly manifest information). But there is a limitation with netmodule files; it has to be required assembly linking for execution [you can use /addmodule switch of compiler to link the netmodule into assembly].
 
Figure 2: [CSharpHelloWorld.netmodule] Contain only metadata information.
 
Note:-
            Type the following command on Visual Studio Command prompt to generate netmodule file
            csc.exe /t:module HelloWorld.cs                                
            This blog contain only initial level of information. *

Read Full Post | Make a Comment ( None so far )

Recently on Saqib Ullah...

SOA Definition Confusion

Posted on August 19, 2008. Filed under: SOA |

SOA Dimensions

Posted on August 12, 2008. Filed under: SOA | Tags: |

Allow your framework to load custom assemblies

Posted on July 28, 2008. Filed under: .Net, Framework, OOP | Tags: |

Visual Studio 2005 SDK 2007.02 Error with IronPython Project

Posted on February 18, 2008. Filed under: .Net, IronPython |

Get list of types from assembly in IronPython

Posted on February 18, 2008. Filed under: IronPython | Tags: |

Hello world!

Posted on February 18, 2008. Filed under: Uncategorized |

List of all controls in a particular form from an Assembly

Posted on January 31, 2008. Filed under: .Net |

List of all Form from an Assembly

Posted on January 30, 2008. Filed under: .Net |

Liked it here?
Why not try sites on the blogroll...