How to: Uninstall an assembly (dll) from the GAC

So, you probably have already tried going to the GAC and selecting uninstall, if not, below are the instructions:

  1. Navigate to the GAC, which is located at %systemdrive%WindowsAssembly.
  2. Right-click on the assembly you wish to uninstall, click Uninstall, and then click Yes to confirm. 

In my case I kept wondering why I can’t possibly follow those simple instructions. The reason is that you have to be able to write to the directory (i.e. have permissions to write to the directory) which you would think as an administrator you would, but it turns out you have to be a local administrator to do that. Anyway, so what should the people who don’t want to bother doing that can do? Well, you can run a command line to uninstall Dlls pretty easily, just remember to execute it using elevated permissions:

  1. Open a Visual Studio command prompt and don’t forget to right click and run as an Administrator. *click Microsoft Visual Studio 20xx Command Prompt.*
  2. At the command prompt, type the following command:

    gacutil /u <fully qualified assembly name>

    In this command, assembly name is the name of the assembly to uninstall from the GAC.

    For example

    gacutil /u “Domain.Solution.Project,Version=1.0.0.0, Culture=neutral, PublicKeyToken=somekeyvalue”

    gacutil /u Telerik.Web.UI

You may also like...

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: