Assemblies Types in C#
In this article we will discuss about what are types of Assemblies in C#.
We can create two types of assemblies.
- Private Assemblies
- Shared Assemblies
By default we create assembly becomes private. A private assembly is used by only one application. By Default, when a C# program is compiled, the assembly produced will be private. This assembly (DLL/EXE) should be placed in the same folder as the calling application. With a private assembly it's not possible to think about naming conflicts with other classes or versioning problems because each application has its own copy of the assembly.
There is the drawback of private assembly and it is whichever application will take the reference of private DLL , a single copy of DLL exists within application folder. So, we convert private assembly into shared assembly because when its copy is also created then it will occupy the extra space of the memory. So, to increase the performance we will make the shared assembly.
A shared assembly is shared amongst different applications. We convert the private assembly into shared assembly and shared assemblies are physically exists in GAC(Global Assemble Cache). A shared Assembly is always unique. To be uniquely identified, a shared assembly has a strong name. The combination of a file name, a public key , a version number and culture (local details) gives an assembly a strong name, which is guaranteed to be unique.
Ask Your Question
Got a programming related question? You may want to post your question here