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.
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) andNativeImages_v...folders holding the native images generated byngen.
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
# Subfolders of the legacy GACGet-ChildItem "$env:windir\assembly" -Directory -Force | Select-Object Name
# GAC of .NET Framework 4 and laterGet-ChildItem "$env:windir\Microsoft.NET\assembly" -Directory -Force:: From a Visual Studio developer command prompt: list the GAC assembliesgacutil -l