.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.
  2. Consulting: If you want to improve feature velocity, reduce costs, and make your systems more scalable, secure, and resilient, then let’s work together and make it happen.
  3. Join my FREE Community on Skool, where you can ask for help, share your success stories and hang out with me and other like-minded people without all the negativity from social media.

 

Leave a Comment

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