Installing an Assembly in GAC
page 6 of 6
by Haroon Malik
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 49204/ 36

Conclusion

In this article you learned the process of adding an assembly to the GAC. First you were introduced to what Global Assembly Cache is and how it differs from the \bin directory, by expanding the scope of the assemblies and compiled components by making them available throughout applications.

Next you were told about Strong Names and why assemblies are required to be strong named before they are to be added to the GAC. After generating a strong name key pair file, you saw how its get associated with the original assembly file and finally how you can add an assembly to the GAC directory.


View Entire Article

User Comments

Title: Nice Article   
Name: Bindya
Date: 2011-03-29 4:26:57 AM
Comment:
Thanks,Helped me a lot
Title: Nice One   
Name: Jack Daniel Morilla
Date: 2011-01-12 9:31:10 PM
Comment:
Thank you...it helps for me a lot...
Title: Thanks   
Name: M.A.
Date: 2010-12-18 12:27:40 PM
Comment:
Thank you so much for this article. Especially the thing with sn.exe was very helpful for me. MSDN not described very well.
Title: Installing an Assembly in GAC   
Name: Haroon Malik
Date: 2010-11-11 1:02:06 PM
Comment:
This artical is very help full for me.Thank you very much.

Thanks and Regards,
P.Harish.
Title: Installing Assembly in GAC   
Name: Anil Metugade
Date: 2010-07-31 3:59:26 AM
Comment:
Ya nice article
Title: why do we need to istall an assembler   
Name: Salalenna Kuti
Date: 2010-07-21 7:26:53 AM
Comment:
i was expecting a title under the umbrella title of installing assembly that will show the importance of installing an assembler under the .netframework.thank u
Title: GAC   
Name: Anusha
Date: 2010-04-30 9:12:50 AM
Comment:
Simple and brief explaination..nice
Title: Good work   
Name: Rajeshree
Date: 2010-03-19 6:03:09 AM
Comment:
I was looking for something very crisp, easy to understand,recallable stuff. Ur article is really good one.
Thanx for posting it...
Title: Nice Article   
Name: Bala
Date: 2010-03-11 5:15:15 AM
Comment:
I was eagerly in search of such an article. Really nice article. It helped to generate strong name file, attach it to assembly and finally place assembly into GAC.
Thanks & Regards
Balasaheb
Title: How do we add a DLL to the GAC without the source code   
Name: Jean-François Beauchamp
Date: 2010-01-05 9:08:36 PM
Comment:
Hi!

Is it possible to add a DLL to the GAC if I don't have the source code?

Cheers!

JF
Title: comment   
Name: קייטרינג
Date: 2009-12-01 3:59:39 AM
Comment:
Thanks,
keep on posing good articles!
Title: Senthil   
Name: Senthil Kumar
Date: 2009-11-16 9:13:07 PM
Comment:
The explaination is really precise and explained in very simple way. Very well done.I didnot see best article like this
Title: Satheesh   
Name: Satheesh M Nair
Date: 2009-11-11 2:10:07 AM
Comment:
This article is very good and nice
Title: Dinesh   
Name: Dinesh Samtani
Date: 2009-09-11 5:02:48 AM
Comment:
This is a wonderfull article, but can you add a link to the topic of delay signing into this?
Title: Vinitha   
Name: Vinitha Varun
Date: 2009-07-21 2:23:37 AM
Comment:
Thanks a lot..very nice article..
Title: sachin   
Name: sachendra singh chauhan
Date: 2009-07-18 4:41:36 AM
Comment:
it's very easy process....
Title: nin   
Name: nino
Date: 2009-02-10 3:27:32 PM
Comment:
how do you make a msi file to do the same thing. your articl is trivial
Title: Mr.   
Name: Edward Joell
Date: 2009-01-19 1:45:47 PM
Comment:
sn -k resullts in "sn" is not recognized as an internal or external command operatable program or batch file.
Title: GAC article   
Name: a
Date: 2008-12-15 2:48:58 PM
Comment:
Clear and informative! Here is some supplemental information regarding web.config in the framework 3.5: http://www.4guysfromrolla.com/articles/121207-1.aspx
Title: GAC   
Name: Saurabh
Date: 2008-10-25 6:46:33 AM
Comment:
Really Good!!!
Title: GAC   
Name: Oli
Date: 2008-09-19 5:03:31 AM
Comment:
The explaination is really precise and explained in very simple way. Very well done.
Title: GAC   
Name: lucky
Date: 2008-07-14 8:10:38 AM
Comment:
Absolutely solid ! Very well explained keep it up!!
Title: GAC   
Name: Amol Gathale
Date: 2008-07-02 1:50:40 AM
Comment:
Thanku Sir From Your article i am able to make the simple assembly to the globaly accessible assembly.I have the problem as i am creating one application . i want to instal on another machine.Please help me sir.email on :gathaleamol_1984@rediffmail.com
Title: Very Gud Article   
Name: Jayan
Date: 2008-06-20 3:36:58 AM
Comment:
Hi this is wonderful
Title: Good Job   
Name: Naveen Kumar
Date: 2008-05-14 9:23:08 AM
Comment:
Good articale...keep it up guys!!!!
Title: How to give reference to the other projects   
Name: Sajesh Kumar.K.P
Date: 2008-03-12 12:13:43 PM
Comment:
Hi Malik,
Thanks for the detailed and simplyfied information.
But i am having a doubt, now i am able to register an assembly in the GaC. But i am not able to add that assembly reference to some projects.
Please tell me the steps.
I am using Visual studio 2.0 version.
thanks
Sajesh
Title: Mr.   
Name: MeanDude
Date: 2008-03-11 11:22:31 PM
Comment:
Totally solid. I'm new at playing with .NET and the whole "how do I install an assembly into the GAC" thing has had me cussing for about thirty minutes. This was perfect and written in a way that I could understand. Thank you!
Title: Mr.   
Name: Kamrul Ahsan Chowdhury
Date: 2008-02-25 11:46:04 AM
Comment:
I m so impressed with this article.
Title: Where should I put this code   
Name: Amit jain
Date: 2008-01-18 5:41:38 AM
Comment:
When and where this code should i put.
Title: Simple but useful   
Name: Pavlo
Date: 2008-01-12 7:26:02 PM
Comment:
Perfect article for newbies.

In fact - these tricks with GAC should know every .NET developer!
Title: Good job   
Name: Sterling "Chip" Camden
Date: 2007-12-27 3:23:48 PM
Comment:
Thanks for the great tutorial. BTW, VS 2005 also has an option in the Project Properties to "sign" the assembly, which lets you generate the snk file and associate it with the assembly right there. All you have to do is rebuild and then add the assembly to the GAC using gacutil.

Keep up the great work!
Title: neelesh   
Name: neelehsgour
Date: 2007-10-17 1:47:35 AM
Comment:
it is a very good article i have learnt very new thing to this article.Keep writing...
Title: Nice   
Name: BalaMurugan J
Date: 2007-07-20 2:49:24 AM
Comment:
Very easy to understand and good
Title: Very Well   
Name: Adam Pan
Date: 2007-07-19 7:33:31 AM
Comment:
Phase I: {sn -k sample.snk};
Phase II: Rebuild yours project(class library);
Phase III:Gacutil /u sample.dll
Phase IV: Gacutil /i sample.dll
Phase II must do before your using gac util tool.

Thank you!
Title: Excellent   
Name: Sumy Antony
Date: 2007-06-15 9:33:26 AM
Comment:
Article was excellent !!!!
Title: That is excellent   
Name: Anthony Nadar
Date: 2007-06-14 8:12:24 AM
Comment:
This artical is really simple to understand and digest. From long I wanted to know what exactly this bloddy GAC is. Now on reading your article it really became very simple for me to understand and keep in mind.

Thanks for the simple words used to understand the concept.

Keep it up.
Title: Hi   
Name: King
Date: 2007-05-22 8:39:59 PM
Comment:
GAc installation is done but how could i acces the dll in projects
Title: Perfetto   
Name: Edo
Date: 2007-04-04 3:01:58 AM
Comment:
Thanks, i learn what i want.
Title: Some missing things   
Name: Juanchi
Date: 2007-03-19 2:11:43 AM
Comment:
I can't believe 99% of comments are like... congratulations?
It helps a lot, but there are a few things missing.
It would be great to explain where the sn.exe is taken from, plus it's not clear that "in the code of your assembly" means in AssemblyInfo file, plus where the .snk file should be stored? What about the debug and release directories, it must be in both?
It's a good article, but anyone that puts the hands at work find theese among other doubts. It could be great to complete this article a bit more.
Anyway, thank you!!
Title: Mr.   
Name: Ricardo
Date: 2007-02-17 10:30:24 AM
Comment:
Finally found how to install the assembly in GAC
Title: GAC in ASP.net   
Name: Jaydip
Date: 2007-02-17 12:41:03 AM
Comment:
in case of asp.net application how is this possible to put an assembly in the server's GAC?Will the hosting provider allow us to do that?
Title: Mr   
Name: Alex Coll
Date: 2007-02-06 5:34:32 AM
Comment:
See

http://support.microsoft.com/default.aspx?scid=kb%3ben-us%3b306149

for information on having an assembly installed in the GAC appear in the Add References dialog.
Title: Is it so simple!   
Name: Sanju, Delhi
Date: 2007-02-06 4:49:03 AM
Comment:
I was doing a lot of research as I had to install some assemblies. I had tried out the gacutil way of registering earlier, but it was not successful. It didn't do it, with an error message as "Failed adding assembly to cache: unknown error".
When I searched on net, I could realize that probably it could have happened because of version differences in the gacutil and the current .NET version
Let me try out the explorer method now as u have explained. Drag and Drop!
Thank you
Title: good one   
Name: balaji
Date: 2007-02-06 12:34:13 AM
Comment:
It is very good one.Any one can follow it very easily.
Title: very nice   
Name: praveen battula
Date: 2007-01-23 8:10:26 AM
Comment:
hi, i don't know the author, but i want to appreciate him, really nice article, it helps me very much, thanks a lot,
nice , thanks to 123aspx.com.
Title: GAC   
Name: Abun
Date: 2007-01-16 12:03:37 AM
Comment:
What a nice article!excellent!
Title: Mr.   
Name: Muneendra
Date: 2007-01-11 12:11:26 AM
Comment:
Your explanation about GAC and Strongname is excellent.It is very easy understand and also clearly.
And also I am saying Thanks...
Title: Registering Strong Name Assembly   
Name: Jan Palmer Vergel jan@satoasiapacific.com
Date: 2006-12-04 8:44:35 PM
Comment:
I ran the gacutil to register my dll:

gacutil /i SAPGOFConvertor.dll

but I encountered this message:

"Microsoft (R) .NET Global Assembly Cache Utility. Version 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.

Failure adding assembly to the cache: The module was expected to contain an as
sembly manifest. "

I appreciate anyone who can shed a light to solve this.
Thank You.. jan@satoasiapacific.com or janverge@gmail.com
Title: Mr   
Name: Manigandan
Date: 2006-11-27 5:14:02 AM
Comment:
Your article gives me the clear idea of strong name and GAC and it's very useful for my project.

Thanks a Lot
Title: Mr   
Name: Percival Caburian
Date: 2006-10-31 3:35:50 AM
Comment:
Every site seems to show how to install to GAC! -- (It's overrated now and a very boring topic)

How now do we reference the "SHARED" assembly in the GAC via the Add References of the VS 2005 IDE?

I can't see my GAC assemblies listed!

(It seems you can put in but not reuse from GAC.)
Title: Ms.   
Name: Patty
Date: 2006-10-24 2:20:03 PM
Comment:
Excellent. Keep it up
Title: Mr.   
Name: Anand
Date: 2006-10-13 7:20:16 AM
Comment:
Execllant article. GAC has been explained in a very simple way!!
Title: mr   
Name: jairam
Date: 2006-09-30 1:27:13 PM
Comment:
superb explanation and very informative,i appreciate your efforts in doing this
Title: Excelent   
Name: Bruce One
Date: 2006-09-30 8:21:52 AM
Comment:
Excelent article, precise and concise...
Title: GAC   
Name: Hemang
Date: 2006-09-25 5:25:37 AM
Comment:
Very good article
Title: Appriciation   
Name: Shashank Shekhar Singh
Date: 2006-09-19 3:54:46 AM
Comment:
Good one - keep it up!!!!!!!!
Title: Mr   
Name: venkat
Date: 2006-09-13 3:54:32 AM
Comment:
this article very useful for how to install gac in our application.it helps to everyone can to do this.
Title: Mr   
Name: Pratik Shah
Date: 2006-08-29 5:21:08 AM
Comment:
Thanx for this article. Can u please tell me how to use multiple language in one application?
Title: Mr.   
Name: Sanjay Jaiswal
Date: 2006-08-09 5:59:42 AM
Comment:
This is the Nice article to give the answer of my query... why to create the assembly and How to make it available for the whole .Net Application......simply Best!!!
Title: good introduction   
Name: mglil
Date: 2006-07-18 3:13:15 PM
Comment:
your article is good introduction
Title: Mr   
Name: Naji Shaban
Date: 2006-07-01 9:06:10 PM
Comment:
Can't make it easier to understand. Nice work. -:)
Title: Helpful   
Name: Shiv India
Date: 2006-06-24 9:45:24 AM
Comment:
Nicely Explained the GAC
Title: Mr.   
Name: Vinit Srivastava
Date: 2006-06-09 7:01:39 AM
Comment:
i understand GAC in very easy way. u describes in ur articl in very simple and easy language.
Title: Global Assembly Cache   
Name: Haroon Malik
Date: 2006-05-26 2:35:31 AM
Comment:
gud document. easy to understand for beginners
Title: Mr.   
Name: Yogi
Date: 2006-03-31 11:08:41 AM
Comment:
it'good

keep it ....
Thanks :)
Title: Ripped   
Name: Andy Miller
Date: 2006-03-16 3:03:29 PM
Comment:
This article has some striking similarities to one in the asp.net Developer's Cookbook (sans a few personal comments...)
Title: miss   
Name: shanti
Date: 2006-03-03 3:34:00 AM
Comment:
Fantastic!
Title: GAC Code Description is Very Good   
Name: siva
Date: 2006-02-19 11:06:59 PM
Comment:
Your GAC Code Descrition is very good and Simple

By
siva.P
Title: GAC   
Name: Rajesh Medackel, India
Date: 2005-12-07 2:37:27 AM
Comment:
An Excellent writeup on GAC.

Thanks a lot from the Web Community, Haroon Malik.

You deserve an applause
Title: Thank You!!   
Name: Jordi
Date: 2005-11-18 12:24:39 PM
Comment:
This article is awesome! I'm using webmatrix doing and asp.net page with vb.net. I had added everything to the GAC and added the reference in webmatrix but kept getting an error saying it couldn't find the namespace. After relentless searching i found your article, created a Bin folder in the directory with the files and dropped the Sybase.Data.AseClient.dll file in there and it worked!! Thank You!
Title: Mr   
Name: Shankar
Date: 2005-07-29 7:47:57 AM
Comment:
Excellent! U had made a complex thing simple for those new to this area!! Great... and Thanks a lot...Do Continue ur services...
Title: -   
Name: Europa
Date: 2005-07-27 6:19:53 AM
Comment:
Simple and efficient! Brilliant.
Title: Ms.   
Name: Mei
Date: 2005-05-31 9:37:43 PM
Comment:
Excellent explaination about GAC, however, we may need to add some notice about the "third-party" components/controls issue here, e.g. need to put the third party assembly in the web.config file in order for aspx page to find the shared assembly..
Title: Ok Good   
Name: Firose Babu
Date: 2005-04-28 9:37:03 AM
Comment:
Ok good
Title: great   
Name: santosh kapse
Date: 2005-04-07 9:05:37 AM
Comment:
hi

u explain the thing in very simple and easy way by taking care of all the requirement ...


thanks i got the concept of GAC
Title: nice   
Name: ravi
Date: 2005-03-28 3:17:41 AM
Comment:
ver nice
Title: Mishra   
Name: Gyanesh
Date: 2005-03-08 6:54:43 AM
Comment:
really VERY GOOD demo for installing GAC.
Thanks.
Title: mr   
Name: Gyanesh
Date: 2005-03-05 12:56:49 AM
Comment:
very good
Title: Mr.   
Name: Shankar Prasad.C
Date: 2005-01-31 12:32:48 PM
Comment:
Your article explained about the GAC and Strong name concepts in as simple yet effective way. Keep it up.

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-03-28 8:43:25 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search