Hi All
I have a query that
How to make a private assembly into share assembly. Please describe fully, which understand easily. I wish you all very good day.
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Posted May 19, 2011, 1:36 AM EDT
Creating an assembly key file
The steps involved in adding an assembly to the GAC is not as simple as adding the assembly to a web application. Since all applications can access this library, some security precautions have been taken by Microsoft to ensure uniqueness, version protection, and code integrity. This is achieved by creating a strong name for your new assembly. A Strong Name consists of the assembly indentity and also a public key and digital signature.
To create a strong name, you use the syntax:
[assembly: AssemblyVersion("1.0.1.1")]
[assembly: AssemblyKeyFile("c:\\DuttLibrary.snk")]
Adding your assembly to your GAC
contains Metadata, Manisfest & Intermediate Language code.
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.
Hope this helps you.