Search code examples
.netvisual-studio-2010.net-4.0clrgac

GAC folders - too many?


Im getting confused

one time and for all

the VS add reference (/net tab) says that dll's gac are here : enter image description here

And I found this folder which contains GAC : ( p.s. why 3 Gac's types ? ) enter image description here

And also this folder which contains GAC :

enter image description here

Can someone , please , fix my headache ?


Solution

  • After installing .NET 4 there are actually two GACs in your system, one for .NET version 2-3.5 and one for version 4. This is already explained here. Each of those directories has a number of subfolders which contain assembly images with code in x86, x64 and MSIL.

    The "reference assemblies" directory inside Program Files is not a GAC.

    To answer Alex Dn's comment as well: you should not care where the DLL goes once you install it in the GAC. The very purpose of gacutil is to hide this knowledge from you so that .NET doesn't go the familiar way of picking up dependencies from people who partially "reverse-engineer" how stuff works and then e.g. hardcode a path inside their application.