Creating an Assembly Programmatically
page 3 of 7
by Uday Denduluri
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 34346/ 53

Classes Used for Creating an Assembly

Let us now understand the types used for creating the Assembly. Let us understand each one of them in detail.

Type Name



Defines and represents a dynamic assembly. A dynamic assembly is an assembly that is created using the Reflection Emit APIs. The dynamic modules in the assembly are saved when the dynamic assembly is saved using the Save method.

An AssemblyBuilder object is created by the DefineDynamicAssembly method of the AppDomain Class.


Defines and represents a module. A ModuleBuilder instance can be created by calling DefineDynamicModule method of the AssemblyBuilder class.



Defines and creates new instances of classes during runtime. This can be created by the CreateType Method of the ModuleBuilder class


Represents an application domain, which is an isolated environment where applications execute. We can create this by using the CreateDomain method, but we need the current AppDomain instance. Hence, we take it from the current thread in which the application is running.


Describes an assembly's unique identity in full. The AssemblyName object contains information about an assembly, which can be used to bind to that assembly. An assembly's identity consists of the simple name, version number, cryptographic key pair, and supported culture. We need to use this instance to give the name of the assembly.


Defines the access modes for a dynamic assembly. This is an enumeration. The enumeration values are as follows ReflectionOnly – The dynamic assembly is loaded into the reflection-only context and cannot be executed. 

Run - The dynamic assembly can be executed but not saved. 

RunAndSave – The dynamic assembly can be executed and saved. 

Save – The dynamic assembly can be saved but not executed.


View Entire Article

User Comments

Title: no explantion   
Name: divys
Date: 2012-10-03 2:13:12 AM
hi where is the coding part
Title: method and purpose for creating assemblies   
Name: alice
Date: 2010-07-26 8:18:31 AM
can u elaborate more on my title i dnt understand what should be written pliz
Title: Nice   
Name: sandip
Date: 2010-07-13 5:32:38 AM
Good, its good information
Title: Hum Tum   
Name: Nitin Tiwari
Date: 2007-09-22 4:49:08 AM
very Nice description....fine

Community Advice: ASP | SQL | XML | Regular Expressions | Windows

©Copyright 1998-2024  |  Page Processed at 2024-07-24 8:43:16 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search