Skip to Main Content
C# in a Nutshell
book

C# in a Nutshell

by Ben Albahari, Ted Neward, Peter Drayton
March 2002
Intermediate to advanced content levelIntermediate to advanced
864 pages
31h 8m
English
O'Reilly Media, Inc.
Content preview from C# in a Nutshell

Name

GacUtil.exe — Global Assembly Cache Utility

Synopsis

gacutil option

Description

Allows you to install, uninstall, and list the contents of the Global Assembly Cache (GAC).

Examples

Create a module, generate a key-pair, build a signed manifest assembly containing the module, and install the assembly in the GAC:

C:\home>csc /t:module Example.cs
Microsoft (R) Visual C# .NET Compiler version 7.00.9447
for Microsoft (R) .NET Framework version 1.0.3617
Copyright (C) Microsoft Corporation 2001. All rights reserved.
  
C:\home>sn -k example.key
  
Microsoft (R) .NET Framework Strong Name Utility  Version 1.0.3617.0
Copyright (C) Microsoft Corporation 1998-2001. All rights reserved.
  
Key pair written to example.key
  
C:\home>al /keyfile:example.key /out:Example.dll Example.netmodule
Microsoft (R) Assembly Linker version 7.00.9447
for Microsoft (R) .NET Framework version 1.0.3617
Copyright (C) Microsoft Corporation 2001. All rights reserved.
  
C:\home>gacutil /i Example.dll
  
Microsoft (R) .NET Global Assembly Cache Utility.  Version 1.0.3617.0
Copyright (C) Microsoft Corporation 1998-2001. All rights reserved.
  
Assembly successfully added to the cache

Delete all assemblies named Example from the GAC:

C:\home>gacutil /u Example Microsoft (R) .NET Global Assembly Cache Utility. Version 1.0.3617.0 Copyright (C) Microsoft Corporation 1998-2001. All rights reserved. Assembly: Example, Version=2.0.0.0, Culture=neutral, PublicKeyToken=9a587aa1499c251f, Custom=null Uninstalled: Example, Version=2.0.0.0, Culture=neutral, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

C# 8.0 in a Nutshell

C# 8.0 in a Nutshell

Joseph Albahari, Eric Johannsen
C# 10 in a Nutshell

C# 10 in a Nutshell

Joseph Albahari
C# in a Nutshell, Second Edition

C# in a Nutshell, Second Edition

Peter Drayton, Ben Albahari, Ted Neward
Code like a Pro in C#

Code like a Pro in C#

Jort Rodenburg

Publisher Resources

ISBN: 0596001819Catalog PageErrata