difference between public and private assemblies in .Net?

Posted by Rajendra.prasad under C# on 4/18/2010 | Views : 8843 | Status : [Member] | Replies : 2
Hi All,
if i give a references to both pubic N private assemblies in one single project, then private assembly dll file will be present in the project bin folder. then what about the public assembly. even we can find the copy of public assembly as a dll file in the project bin folder?



Posted by: Vuyiswamb on: 4/19/2010 [Member] [MVP] [Administrator] NotApplicable

Yes , because they will both me be used by the application.

Thank you for posting at Dotnetfunda

Rajendra.prasad, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naveenmanam on: 4/19/2010 [Member] Starter

An assembly is the basic building block in .NET. It is the compiled format of a class, that contains Metadata, Manisfest & Intermediate Language code.

An assembly may be either Public or Private. A public assembly means the same as Shared Assembly.

Private Assembly - This type of assembly is used by a single application. It is stored in the application's directory or the applications sub-directory. There is no version constraint in a private assembly.

Shared Assembly or Public Assembly - A shared assembly has version constraint. It is stored in the Global Assembly Cache (GAC). GAC is a repository of shared assemblies maintained by the .NET runtime. It is located at C:\Windows\Assembly OR C:\Winnt\Assembly. The shared assemblies may be used by many applications. To make an assembly a shared assembly, it has to be strongly named. In order to share an assembly with many applications, it must have a strong name.

A Strong Name assembly is an assembly that has its own identity, through its version and uniqueness.


Rajendra.prasad, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response