.Net Tips – Finding GAC

Yan Cui

I help clients go faster for less using serverless technologies.

By default the GAC folder in Windows is located at %windir%\assembly, you can find all the registered DLLs in that folder. Whilst you can open it in windows explorer and view it like any other folder, it is a somewhat special and allows you to have different versions of the same DLL registered in the GAC. 

Open up DOS prompt and navigate to the GAC folder, for instance:

image

and you can see that the GAC is actually a folder inside the assembly folder, and drilling a little deeper reveals that each DLL has its own folder which contains all the registered versions, each as a folder that contains the actual DLL inside:

image 

image

image

.Net 4

For .Net 4, the GAC location is now %windir%\Microsoft.Net\assembly.

Global Assembly Cache Tool

You can use gacutil.exe from the command line to view (e.g. gacutil /l), add (e.g. gacutil /i SomeAssembly.dll) or remove (e.g. gacutil /u SomeAssembly) the contents of the GAC, this of course, supports multiple versions of the same assembly too.

Whenever you’re ready, here are 3 ways I can help you:

  1. Production-Ready Serverless: Join 20+ AWS Heroes & Community Builders and 1000+ other students in levelling up your serverless game. This is your one-stop shop for quickly levelling up your serverless skills.
  2. I help clients launch product ideas, improve their development processes and upskill their teams. If you’d like to work together, then let’s get in touch.
  3. Join my community on Discord, ask questions, and join the discussion on all things AWS and Serverless.

Leave a Comment

Your email address will not be published. Required fields are marked *