Plunging into .NET Development

Weblog Pieter Gheysens
Microsoft .NET Development - C# - Enterprise Library - Visual Studio 2005 Team System - Compuware DevPartner - ...

Friday, February 16

Different views of the GAC

Each computer wherein the common language runtime is installed has a machine-wide code cache called the Global Assembly Cache. This Global Assembly Cache stores .NET assemblies specifically designated to be shared by several applications on that computer.
  • Shell Extension [SHFusion.dll] (default)
    Go to Run Window in Start Menu : "%systemroot%\assembly".
  • GAC Directory Browsing

  • Go to Run Window in Start Menu : "%systemroot%\assembly\GAC".
The first view is the default view, but the second view helps you to find/locate the real assembly that you might need! There is also a registry modification possible to override the default view to the second view :
  • Open Registry with regedit, browse to HKLM\Software\Microsoft\Fusion
  • Add a REG_DWORD value named "DisableCacheViewer"' and set it's value to 1
Developers also face a very common issue in Visual Studio when they want to add a reference to an assembly in the Global Assembly Cache. The problem is that the Add Reference dialog box is path-based and does not enumerate the components from the GAC. See this Knowledge Base Article for a possible workaround.



  • At 2:05 PM, Anonymous Bart De Smet said…

    Hi Pieter,

    Unfortunately it's not possible to dive in the GAC_MSIL (portable assemblies) and GAC_32 (32-bit assemblies) folders this way unless you disable the shell extension. Since .NET 2.0 assemblies are kept in separate GAC locations depending on the processor architecture they've been compiled to; because of this %windir%\assembly and %windir%\assembly\GAC will be out of sync since the former one aggregates all these locations in one "convenient" place.


  • At 9:07 AM, Anonymous Mahesh Kumar said…

    Hi Pieter,
    Nice blog on .NET Stuffs..subscribed to my reader....
    keep bloggin and sharing.


Post a Comment

Links to this post:

Create a Link

<< Home