By Default assemblies are private.
An assembly is a fundamental unit of any .Net application. It contains the code that is executed by CLR(common language rntime).
** An assembly conatins name, version,types(Classes and others) createed in it and details about other assemblies it references.
** An assembly may be either an executable fiele - .exe or a dynamic link library-.dll
Structure of Assembly:
The following are the content of an assembly. Each assembly contains first theree parts. Fouth part may not be present in all assemblies.
It is used primarily for localization-
Using resource according to the country or region
1. Assembly metadata or manifest
2. Type Metadata
3. MSIL code
4. Resources
ASSEMBLY METADATA OR MANIFEST:
this contain all the information about the assembly. assemblies in .Net are self describing.
they contain all the information that .net needs to use them.
Metadata contain following details:
1. Assembly name
2.version number of the assembly, Four numbers in the format
3.MAJOR.MINOR.REVISON.BUILD
4.culture- language assembly soupports
5.string name- require only for global assembly
6.list of files in the assembly -An assembly can be made up of multiple files
7.Information about referenced assemblies- Contains list of other assemblies referenced by this assembly. For each assembly referenced we have assembly name, version,culture and public key.
Type of metadat::
this section of an assembly conations information about all classes, structure etc created in the assembly
MSIL code
MSIL CODE OF THE assembly is placed in third party of the assembly. This msil is converted to natuve code by clr at runtime.
Resources:
this section contains message and pictures used by assembly.
--------------------------------
step 1(Private Assembly) :
Create an assembly in C#.(generally it is private assembly).
Step 2 (Global Assembly):-
Create an assembly in C# and go to the project property and select the sign tab
and check the sign box, and browse the key or make new key .
i.e the strong name giving to the shared assembly.
Install that assembly into the GAC by using the following command:
use the path of your file or dll and write the command.
Gacutil -i dllname.
About PDB FILES: (Portable Database Files)
No comments:
Post a Comment