What exactly is an Assembly in C# or .NET?

Viewed 105832

Could you please explain what is an Assembly in C# or .NET?

  1. Where does it begin and where does it end?
  2. What important information should I know about Assemblies?
9 Answers

The answer is in order for immediate-grasping.

Put simply, it is the compiled project involving your classes and additional files, if there are. That is, each project in a solution is assembly.

Or more techinally,

An assembly is where a type is stored in the flesystem. Assemblies are a mechanism for deploying code. For example, the System.Data.dll assembly contains types for managing data. To use types in other assemblies, they must be referenced. - Source

How do we know it? If you glance at properties of a project under the solution you can see the following images.

When you compile the project, it turns out to DLL or EXE.

enter image description here enter image description here enter image description here

After writing source code of your program(project) then a file is created which may be DLL or EXE depends on your project. It makes only once for a single project. It has two types 1:- single 2:- shared or multiprogram single assembly used only in a single program while shared can be used for multiprogram

An Assembly is a collection of logical units. Logical units refer to the types and resources which are required to build an application and deploy them using the .Net framework. Basically, Assembly is a collection of Exe and DLLs. It is portable and executable.

Related