LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

gacutil

Global Assembly Cache management utility

TLDR

Install assembly to GAC
$ gacutil -i [assembly.dll]
copy
Uninstall assembly from GAC
$ gacutil -u [AssemblyName]
copy
List assemblies in GAC
$ gacutil -l
copy
List specific assembly
$ gacutil -l [AssemblyName]
copy
Install from package
$ gacutil -i [assembly.dll] -package [name]
copy

SYNOPSIS

gacutil [options] [assembly]

DESCRIPTION

gacutil manages the Global Assembly Cache (GAC) for .NET assemblies. The GAC stores shared assemblies that can be used by multiple .NET applications.On Linux, gacutil is provided by Mono. It installs, uninstalls, and lists assemblies in the GAC. Strong-named assemblies can be shared across applications through the GAC.

PARAMETERS

-i assembly

Install assembly to GAC.
-u name
Uninstall assembly from GAC.
-l [name]
List assemblies (optionally filtered).
-il listfile
Install assemblies from list file.
-ul listfile
Uninstall assemblies from list file.
-us assembly
Uninstall assembly using its full name from the assembly file.
-package name
Package name for installation; creates a symlink in prefix/lib/mono/NAME/.
-check_refs
Check that installed assembly doesn't reference non-strong-named assemblies.
-root dir
Root directory prefix for GAC operations.
-gacdir dir
Specify GAC directory (deprecated, use -root instead).

CAVEATS

Requires strong-named assemblies for GAC installation. Mono's GAC differs from Windows .NET GAC. Root privileges may be required. .NET Core doesn't use GAC; assemblies are self-contained.

HISTORY

The GAC was introduced with .NET Framework 1.0 by Microsoft for assembly sharing. Mono implemented compatible tools including gacutil for cross-platform .NET development. With .NET Core/.NET 5+, the GAC model was replaced by NuGet packages.

SEE ALSO

mono(1), mcs(1), dotnet(1)

Copied to clipboard
Kai