Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I can install via gacutil, but not uninstall the same dll

Tags:

c#

gac

gacutil

I have installed a DLL using the gacutil.

gacutil.exe /i SI.ArchiveService.CommonLogic.Exceptions.dll

Using the gacutil /l shows that it is indeed installed.

SI.ArchiveService.CommonLogic.Exceptions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=925c8734ae397609, processorArchitecture=MSIL

Then I wanted to uninstall it.

gacutil.exe /u SI.ArchiveService.CommonLogic.Exceptions.dll
Microsoft (R) .NET Global Assembly Cache Utility.  Version 3.5.30729.1
Copyright (c) Microsoft Corporation.  All rights reserved.

No assemblies found matching: SI.ArchiveService.CommonLogic.Exceptions.dll
Number of assemblies uninstalled = 0
Number of failures = 0

Why doesn't this work? How do I uninstall it?

like image 837
Kasper Hansen Avatar asked Mar 25 '11 10:03

Kasper Hansen


3 Answers

Installing an assembly requires the path name of the DLL. Uninstalling requires the display name of the assembly. They don't have to resemble each other. Review the Assembly.FullName property. gacutil.exe /l (ell as in list) gets you a list of display names.

like image 97
Hans Passant Avatar answered Oct 19 '22 02:10

Hans Passant


Nevermind.

gacutil.exe /u SI.ArchiveService.CommonLogic.Exceptions

Did the job. Also navigating to C:\WINDOWS\assembly, right-click on it and then choose uninstall would do it. I figured it out by looking at its properties and the name was without the dll extension.

like image 9
Kasper Hansen Avatar answered Oct 19 '22 02:10

Kasper Hansen


This is a little safer if you have multiple assemblies with the same display name in the GAC

gactutil.exe /u myDll,Version=1.1.0.0,Culture=en,PublicKeyToken=874e23ab874e23ab
like image 4
dynamiclynk Avatar answered Oct 19 '22 01:10

dynamiclynk