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

女生的网名这么多〃 提交于 2020-01-01 08:32:55

问题


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?


回答1:


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.




回答2:


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.




回答3:


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



回答4:


Came here while finding answer but did not get fully .

what you actually need to do is to use double quotes "Assemblyname" surrounding complete assembly name i.e

"YOURDLLNAME, Version=6.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"

Complete process , navigate to this path using command prompt : C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools

and run query : gactuil.exe /u "YOURDLLNAME, Version=6.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"

Hope this helps someone



来源:https://stackoverflow.com/questions/5431412/i-can-install-via-gacutil-but-not-uninstall-the-same-dll

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!