1
Reply

What is Global Assembly Cache (GAC) and what is the purpose of it? (How to make an assembly to public? Steps: How more than one version of an assembly can keep in same place?

18y
11.3k
0
Reply

    Each computer where the common language runtime is installed has a machine-wide code cache called the global assembly cache. The global assembly cache stores assemblies specifically designated to be shared by several applications on the computer.  You should share assemblies by installing them into the global assembly cache only when you need to:

    Steps:
    --- Create a strong name using sn.exe tool
    eg: sn -k keyPair.snk
    ---with in AssemblyInfo.cs add the generated file name.

    eg: [assembly: AssemblyKeyFile("abc.snk")]
    --- recompile project, then install it to GAC by either
    drag & drop it to assembly folder (C:\WINDOWS\assembly OR C:\WINNT\assembly) (shfusion.dll tool)
    or
    gacutil -i abc.dll

    18y
    0