How to: Install an assembly into the global assembly cache
Article
Note
This article is specific to .NET Framework. It doesn't apply to newer implementations of .NET, including .NET 6 and later versions.
The global assembly cache (GAC) stores assemblies that several applications share. Install an assembly into the global assembly cache with one of the following components:
You can install only strong-named assemblies into the global assembly cache. For information about how to create a strong-named assembly, see How to: Sign an assembly with a strong name.
Windows Installer
Windows Installer, the Windows installation engine, is the recommended way to add assemblies to the global assembly cache. Windows Installer provides reference counting of assemblies in the global assembly cache and other benefits. To create an installer package for Windows Installer, use the WiX toolset extension for Visual Studio 2017.
The following example installs an assembly with the file name hello.dll into the global assembly cache.
gacutil -i hello.dll
Note
In earlier versions of .NET Framework, the Shfusion.dll Windows shell extension let you install assemblies by dragging them to File Explorer. Beginning with .NET Framework 4, Shfusion.dll is obsolete.
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
.NET feedback
.NET is an open source project. Select a link to provide feedback:
Create a .NET project and learn to add packages and manage package dependencies in your project. Use the .NET Core CLI and NuGet registry to add libraries and tools to your C# applications through Visual Studio Code.