Skip to contentGo to the directory tree
  1. C:
  2. Windows
  3. assembly
FolderRisk: Do not touch

assembly C:\Windows\assembly

C:\Windows\assembly: the legacy Global Assembly Cache (GAC) of .NET Framework 1.x to 3.5. The .NET Framework 4 GAC is in Microsoft.NET\assembly.

Updated on By AltF4 Formation

What it’s for

The Global Assembly Cache (GAC) is the machine-wide cache of shared code for the Common Language Runtime. From .NET Framework 4 on, its default location is %windir%\Microsoft.NET\assembly. For versions 1.x to 3.5 it is %windir%\assembly, which is this folder.

What it contains

  • .NET assemblies shared by several applications, for .NET Framework versions 1.x to 3.5.
  • Subfolders by assembly type (GAC_MSIL, GAC_32, GAC_64) and NativeImages_v... folders holding the native images generated by ngen.

Risks and best practices

  • Do not copy anything in by hand. Installation goes through an installer or Gacutil.exe, which is a development tool.
  • Deleting a shared assembly breaks every application that depends on it, so keep delete rights to administrators.
  • For a .NET Framework 4 or later application, look in %windir%\Microsoft.NET\assembly. .NET 6 and later do not use a GAC.

Useful commands

Fenêtre de terminal
# Subfolders of the legacy GAC
Get-ChildItem "$env:windir\assembly" -Directory -Force | Select-Object Name
# GAC of .NET Framework 4 and later
Get-ChildItem "$env:windir\Microsoft.NET\assembly" -Directory -Force
Fenêtre de terminal
:: From a Visual Studio developer command prompt: list the GAC assemblies
gacutil -l

Report a mistake