What Are Assemblies?

What Are Assemblies?

 

Assemblies are the deployment units of .NET applications. .NET applications consist of one or

more assemblies. .NET executables with the usual extension EXE or DLL are known by the term

assembly .

 

 

 What ' s the difference between an assembly and a native DLL or EXE?

Though they both have the same file extension, .NET assemblies include metadata that describe all the types

that are defined in the assembly with information about its members โ€” methods, properties,

events, and fields.

The metadata of .NET assemblies also give information about the files that belong to the assembly,

version information, and the exact information about assemblies that are used. .NET assemblies

are the answer to the DLL hell .

 

Assemblies are self - describing installation units, consisting of one or more files. One assembly

could be a single DLL or EXE that includes metadata, or it can be made of different files,

for example,  resource files, modules, and an EXE.

 

Assemblies can be private or shared. With simple .NET applications, using just private assemblies

is the best way to work. No special management, registration, versioning, and so on is needed with

private assemblies.

 

The only application that could have version problems with private assemblies

is your own application. Other applications are not influenced because they have their own copies of the

assemblies.

 

The private components you use within your application are installed at the same time as

the application itself. Private assemblies are located in the same directory as the application or

subdirectories thereof. This way you shouldn ' t have any versioning problems with the application.

No other application will ever overwrite your private assemblies. Of course, it is still a good idea to use

version numbers for private assemblies too. This helps a lot with code changes, but it ' s not a

requirement of .NET.

 

With shared assemblies, several applications can use the same assembly and have a dependency on it.

Shared assemblies reduce the need for disk and memory space. With shared assemblies, many rules

must be fulfilled โ€” a shared assembly must have a version number, a unique name, and usually it ' s

installed in the global assembly cache (GAC).

 

 

 

Next Recommended Reading Get am/pm from datetime in sql query