How to remove .NET assembly DLLs from server GAC

て烟熏妆下的殇ゞ 提交于 2019-12-05 08:56:11

You should be able to do it from using the Windows interface as follows providing you have administrator privileges.

  1. Navigate to the GAC, which is located at %systemdrive%\Windows\Assembly.

  2. Right-click each assembly file that is included in your application, click Uninstall, and then click Yes to confirm

If you are unable to uninstall the dlls via the above method you can access the GAC folder without the special view by opening a run command and entering the path below and hitting enter.

C:\Windows\assembly\GAC_MSIL

This will allow you to interact with all the files in the GAC as a normal folder.

If you have Visual Studio at all, anywhere, you can port gacutil onto the server from its location. On my computer, with Visual Studio 2015, it's at C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools. On another question here on SO, it said you can also just install the Microsoft SDK separately (and it should install there, I assume, or in a different "v" folder if it's a different version). If you know it should be on a particular computer, you can do where gacutil to find it, then copy it, and the gacutil.exe.config file that should be next to it, to the server. ( where is gacutil.exe? )

Sometimes you get an error when you try to remove Oracle.ManagedDataAccess from the GAC using gacutil, that Windows Installer is a dependency ( Unable to uninstall an Assembly from GAC? ). If so, you have to also remove it from HKEY_CURRENT_USER\Software\Microsoft\Installer\Assemblies\Gl‌​obal & HKEY_LOCAL_MACHINE\Software\Classes\Installer\Assemblies\Glo‌​bal, then do the gacutil -u command. I had this issue and I didn't have to go to the HKCU location-but it was at the HKLM location. After removing it from there, I uninstalled & re-installed the Oracle Developer Tools for Visual Studio, just to be safe (I saw it said to do so here: https://community.oracle.com/thread/3944905), then my project finally worked.

Note: When I tried going to C:\Windows\assembly\GAC_MSIL, I never even saw Oracle.ManagedDataAccess, so I could not remove it that way. I'm posting this to help anyone that might run into stubborn DLLs that have the same issue.

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