The .NET Framework consists of the common language runtime and the .NET
Framework class library. The common language runtime is the foundation of the
.NET Framework. The CLR manages and executes code written in .NET languages and
is the basis of the .NET architecture.
The common language runtime (CLR) is just what its name says it is a runtime
that is usable by different programming languages. The core features of the CLR
are:
Memory management,
Assembly loading,
Security,
Exception handling,
Threading
These features are available to all programming languages that run under the CLR
For example, the runtime uses exceptions to report errors, so all languages
that target the runtime also get errors reported via exceptions.
Code that targets the runtime is known as managed code, while code that does not
target the runtime is known as unmanaged code.
Class Library
The class library is an object-oriented collection of reusable types that you
can use to develop applications from simple (command-line or graphical user
interface (GUI)) to Web Forms and XML Web services. The class library is
organized in a hierarchy of namespaces.
Namespaces
Namespaces are the logical grouping of related types. It reduces the chance of
name collisions.
For example, all the classes related to working with the file system are
located in the System.IO namespace. All the classes for working a Microsoft SQL
Server database are located in the System.Data.SqlClient namespace.
Metadata
Metadata means "data about data”. It includes type definitions, version
information, and external assembly references. Metadata is a set of data tables
that describe what is defined in the module, such as types and their members.
In addition, metadata also has tables indicating what the managed module
references, such as imported types and their members.
Assemblies
Assemblies are the building block of .NET framework. It is a self describing
component .Assemblies may or may not be executable, i.e., they might exist as
the executable (.exe) file or dynamic link library (DLL) file. All the .NET
assemblies contain the definition of types, versioning information for the
type, meta-data, and manifest.
There are two kinds of assemblies in .NET
Private
Shared
Private assemblies: A private assembly is used only by a single
application, and is stored in that application's root directory a subdirectory.
Shared assemblies: it is also called strong named assemblies.
Shared assemblies are located in the Global assembly cache. Shared assembly
must contain strong name. A shared assembly can be used by more than one
application. For all calling assemblies within the same application, the same
copy of the shared assembly is used from its original location. That’s why
shared assemblies are not copied in the private folders of each calling
assembly.
Assembly Contents
An assembly can consist of four elements:
The assembly manifest, which contains assembly metadata.
Type metadata.
Microsoft intermediate language (MSIL).
A set of resources.
.
Assembly Manifests
Assembly is a self describing component, means all information that needed to
reference it are kept in assembly itself. The parts of the manifest are:
Sr. No.
Description
1
Identity
It contains name, version, culture, and public key
2
A list of files
It contains the list of files that belongs to the assembly .An assembly can
have one or more files.
3
A list of referenced assemblies.
An assembly can use more than one assembly as reference.