Sunday, February 21, 2010

About Assembly

What is .Net Assembly?

It is unit of deployment

The .NET assembly is the standard for components developed with the Microsoft .NET.

.net assemblies may or may not be Executable,
i.e they might exist as the executable (.exe) file or (DLL) file.

All the .net assemblies contain

1. defination of types,
2. versioning information fo the type
3. meta-data,
4. manifest.


TWO kind of assemblies in .NET
------------------------------

1. Private
2. Public or shared

Private Assembly
--------------
Private assembly are simple and copied with each calling assemblies in the calling assemblies folder.

Public Assembly OR Shared Assembly or Strong Named Assembly
---------------
public assemblies are copied in a single locaiton (Global assembly cache)
for all calling assemblies within the same application.
the same copy of the shared assembly is used from its original location
Hence, shared assemblies are not copied in the private Folders of each calling assembly.

Each Shared assembly has 4 part names

1. face name
2. version
3. public key token
4. culture information

Assembly can be a single file or it may consist of the multiple files

in case of multi-file, there is one master module containing the manifest
while other assemblies exist as non-manifest modules.



[assembly:AssemblyKeyFileAttribute(@"sgKey.snk")]

[assembly:AssemblyKeyFileAttribute("PublicKey.snk")]



Satallite Assembly
------------------

Assembly containing no executable code—only resources. Typically,
satellite assemblies are used for storing localized data.
Satellite assembles can be added, modified, and loaded into a .NET application
at runtime without recompiling. Use the Assembly Linking Utility
to create satellite assemblies by compiling .resource files.

No comments:

Post a Comment