How do I register an DLL in GAC
24 Jun 2005
I have created an DLL & how do I register that DLL into GAC so that all my applns in my machine.
Date: 24/Jun/2005 Rating:
Review This Steps
Date: 25/Jun/2005 Rating:
The link that Abhay has given is good. But I would like to add something to that:
To place a dll into the GAC the following steps need to be done:
1. Generating a public key or a strong name
2. Adding the public key to the AssemblyInfo.vb file of the DLL. This step is called Signing the Assembly with a public key.
3. Build the assembly
4. Placing the dll into GAC .
1. Generating the public key:
As Abhay said, go to visualStudio.Net command prompt and type the following command:
sn -k keyfile1.snk
Here keyfile1.snk is the keyfile we are generating.
You can store this key file in the bin folder of the assembly. In order to do this u have to go to the bin folder. For example:
C:\foldername\assemblyname\bin sn-k keyfile1.snk
By doing this the keyfile is stored in the bin folder.
2. Placing the keyfile into the Assembly.
Go to AssemblyInfo.vb file:
3. Build the Assembly.
4. Placing the assembly into GAC
There are two way in which u can place the assembly into GAC.
1. Using the utility gacutil -i
Here you should give the complete path of the dll
c:\>gactutil -i c:\foldername\assemblyname\bin\assemblyname.dll
2. The second method is u can drag the .dll file from the bin folder of the assembly and drop it into the folder C:\winnt\Assembly
Doing this is same ie placing assembly into GAC.
This thread is locked for new responses. Please post your comments and questions as a
If required, refer to the URL of this page in your
Is there any expert to solve this?
Return to Discussion Forum
Post New Message
Last 7 Days
Anil Kumar ...
Awards & Gifts
Articles Rss Feeds
Forum Rss Feeds
Talk to Webmaster Tony John
Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India