what is GAC and its uses
what is GAC and its uses
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Shivanand ArurPosted Sep 14, 2012, 3:44 AM
A private assembly is an assembly which is stored is the application's directory or a sub-directory. This assembly is used for that specific application only. As the name says, it is a private assembly, It cannot be shared with any other application.
Public Assembly - Suppose tomorrow you create an application and you have many functions which can be used in this application and other apps you might create. In that case, you should create a class with those functions which can be used in multiple apps and just compile it.
The file that is created is a file with .dll extension, this assembly can be added in the GAC using the Visual Studio Command Prompt and write the command "gacutil /i Name of the assembly you created"
(eg: gacutil /i CSharpCorner.dll) where CSharpCorner.dll is your assembly name.
NOTE : Adding an assembly to GAC is not as simple as adding an assembly to a simple web application. There are various steps that has to be strictly followed, since you are adding an assembly to a place where multiple apps will use this assembly. You have to create a strong name of the assembly you created.
These are various links which will help you understand about GAC and how to add your assembly to GAC.
http://msdn.microsoft.com/en-us/library/yf1d93sz(v=VS.71).aspx // About GAC
http://msdn.microsoft.com/en-us/library/wd40t7ad(v=vs.71) // About Strongly Named Assembly
General Links
http://msdn.microsoft.com/en-us/library/dkkx7f79.aspx
http://msdn.microsoft.com/en-us/library/6axd4fx6
http://www.dotnetspider.com/forum/157374-how-put-assembly-GAC.aspx
http://www.dotnetspark.com/Forum/738-where-is-gac-location-windows.aspx
http://www.dotnetfunda.com/interview/exam4404-what-are-the-different-types-of-assemblies-in-net.aspx
Hope this helps you. Thanks
nallyaPosted Sep 13, 2012, 3:37 AM
shared assembely is nothing but assembely can be used in no. of application.
but to make assembely shared it should be strongely named to avoid conflict for this tool sn.exe can be used.